Of all Barack Obama’s costumes, the most ill-fitting is that of the hawk. The guise doesn’t work for all sorts of ideological and historical reasons. Plus there’s the fact that he’s rushing to put on the outfit as he’s heading out the door.

The new sanctions against Russia are fine with me on the merits, even if they are remarkably tardy and being sold in no small part for domestic, political reasons.

Russian President Vladimir Putin has been undermining American interests for a long time now. From the annexation of Crimea and a shadow war in Ukraine to his unabashed support for the butcher Bashar Assad in Syria, Putin has given the Obama administration every excuse to punch back. But until last week, Obama’s response had been to offer various and sundry diplomatic “off-ramps” and a little bit of tongue-lashing.

General dovishness combined with the single-minded pursuit of a deal with Iran led Obama to insist that we should avoid “provoking” Russia.

The satirist who goes by the moniker “Iowahawk” cut to the chase on Twitter:

Russia invades Crimea: oh well Russia shoots down airliner: mistakes happen John Podesta falls for phishing scam: RESTART THE COLD WAR

Obama’s volte-face should be seen in the larger context of his last-minute legacy-padding and his widely alleged desire to “box in” his successor. The president is preparing to spend the next few decades as a celebrity in liberal circles.

Creating national monuments in Utah and Nevada, banning offshore oil drilling in the Arctic and the Northeast, deleting the database of Muslim men at the Department of Homeland Security: All of these things will earn him toasts at all the right parties.

Despite a remarkable lack of evidence that the Russians “hacked” the election (as opposed to their more obvious complicity in the WikiLeaks shenanigans), the conviction that Hillary Clinton lost because of Putin’s skulduggery is rapidly gelling into liberal conventional wisdom. These sanctions give Obama yet another useful talking point in retirement.

They’re also having the desired effect on the Trump team, which for obvious reasons hates any suggestion that The Donald’s election was less than legitimate.

But will they actually “box in” a President Trump? It seems unlikely.

Putin is cleverly not taking the bait, preferring to run out the clock on the Obama presidency. When Trump is sworn in three weeks from now, he will have more leverage over Putin thanks to Obama’s bad-cop act. While it would be politically tricky to lift the sanctions immediately upon taking office, Trump has long vowed to improve relations with Russia. Having more bargaining chips for some grand “deal” — whatever that might look like — only improves his position. (Why he is so enamored with a US-Russian romance is a deeper mystery to me.)

A similar dynamic is at play with Obama’s execrable maneuver at the United Nations Security Council. The decision to clear the path for a resolution holding that the Western Wall is actually a Palestinian possession is a serious blow to our ally (and our honor) and proof that Obama’s rhetorical support of Israel was always more about political necessity than personal conviction. Even as the move will please some — though by no means all — leftists on the party circuit, it is nevertheless a political gift to the two politicians Obama (probably) detests most: Bibi Netanyahu and Donald Trump.

For almost eight years, Netanyahu has argued domestically that Israel’s deteriorating relationship with the United States isn’t his fault, but Obama’s. The president just settled that argument for him.

Meanwhile, the resolution helps Trump enormously. Simply by taking office while holding what once were conventionally pro-Israel positions, Trump can play the role of Israel’s defender, both domestically and abroad. It is lamentable that support for Israel is now a partisan issue in America, but Obama ceded the winning side of the question to his Republican successor.

Much has been written about how Obama has left the Democratic Party and ideological allies in shambles by putting his perceived interests and ego ahead of everything else. As he leaves office, he has turned that domestic story into an international one too.