Sen. Rand Paul (R-Ky.) is taking a lot of friendly fire from libertarians.

The big issue is Paul's vote to confirm Jeff Sessions as attorney general. "[H]ow does a drug war and mass incarceration critic vote for the Senate's most strident supporter of both… to run the DOJ?" asked The Washington Post's libertarian scribe Radley Balko.

Complicating things: While the Kentucky senator seemed to bend on Sessions, he was gearing up to oppose the hawkish Elliott Abrams if he was nominated for deputy secretary of state, just as Paul promised to do whatever it took to block Bush-era hawk John Bolton from either of the top two State Department jobs. (The Abrams point is now moot, as President Trump has personally nixed his nomination.)

But I must say: I think Paul's priorities here are correct.

The libertarian case against Sessions, characteristically well made by Rep. Justin Amash (R-Mich.), is that he is bad on civil asset forfeiture, bad on drug policy, and a throwback to law-and-order Republicanism after several years of conservatives warming to criminal justice reform.

Libertarians believe America is locking too many people up and police power is prone to abuse. While Sessions' views on these subjects have often been caricatured by the left, it is fair to say he is not on the same page as libertarians. And indeed, if Paul had voted against Sessions on the basis of any of this, it certainly would have been defensible.

But no matter who became attorney general, the Trump administration is obviously going to be bad, from a libertarian perspective, on these issues. The president's impulses on dealing with "bad hombres" are not remotely civil libertarian. President Trump was inevitably going to get an attorney general who reflected his views on these issues, and he could have gotten one much less competent and personally decent than Sessions. From a libertarian perspective, Sessions is bad — but it could have been much worse. Sen. Paul understood this.

What is still very much up in the air is what kind of foreign policy we are going to get from the Trump administration. Trump's impulses are often sensible. He understands that the wars of the past 16 years have not achieved their desired objectives despite their considerable cost in blood and treasure.

"One of the things I like most about President Trump is his acknowledgement that nation building does not work and actually works against the nation building we need to do here at home," Paul wrote. "With a $20 trillion debt, we don't have the money to do both."

But obviously, our new president represents some danger abroad, too. Trump temperamentally does not like to back down from fights. And a lot of his advisers are hawkish. It's an open question what his foreign policy will look like.

In that sense, the advice Trump gets on foreign policy can make a big difference. And right now, we are counting on a defense secretary nicknamed "Mad Dog" to be a major voice of restraint.

Abrams is a leading neoconservative, a proponent of the foreign policy Trump rejected when he called the Iraq War a disaster on the eve of winning the South Carolina primary and ending Jeb Bush's presidential campaign. Bolton is no neocon, properly understood. He rejects democracy promotion and other more idealistic parts of the neoconservative vision. But he embraces too low a threshold for the use of military force.

Trump is going to be a law-and-order president. (It's also worth noting that conservative support for criminal justice reform is dependent on relatively low crime rates that were not entirely secured by libertarian means.) But Trump doesn't have to be a hawkish president. Paul understands this, and is picking his spots to oppose and prod Trump accordingly.

As a member of the Senate Foreign Relations Committee, Paul has more practical ability to stall or even circumvent nominees who would try to make the Trump foreign policy George W. Bush 2.0. But if Paul had voted against Sessions, the Alabama Republican would still have been confirmed. Paul would just have been the sole Republican on the side of Democrats who tried to assassinate Sessions' character.

Many libertarians don't like Paul's collegiality with more statist Republicans. But if you are going to work within the Republican Party, sometimes you've got to, well, work within the Republican Party.

Immigration and foreign policy realism are two good things we might get out of a Trump administration. On civil liberties, the new president will sadly not be an improvement over other post-9/11 administrations. That's something we all have to accept.

But anything Paul can do to keep the foreign policy voices surrounding Trump from simply being a cacophony of hawks is constructive — and the smart way to focus his energy.