When details of Russian election hacks first came to light, President Obama faced a delicate dilemma. On the one hand, it's literally in his job description to protect the United States from threats like hostile state actors. On the other, he was already knee-deep in trying to facilitate a smooth transition of power to a technologically illiterate successor who publicly scoffs at allegations of Russian involvement and claims, without explanation or evidence, that the real hacker is Comic Book Guy from The Simpsons.

On Thursday, President Obama resolved this conundrum in a major way, barring certain Russian intelligence officials from the United States, shuttering Russian-controlled properties, and imposing sanctions on Russian companies believed to be involved in the attacks. The social media folks at the Russian Embassy in the U.K. wasted no time in issuing a retaliatory sick Twitter burn.

The sanctions represent the most significant blow yet to Trump's effort to deny Russia's involvement in the hacks. American intelligence officials made up their minds long ago, and even members of Trump's own party are tiring of his see-no-evil act. While Speaker Ryan's response to the president's announcement contained the GOP-mandatory sideswipe at the outgoing administration's foreign policy, it condemned Russia and applauded the sanctions as "overdue." Not to be outdone, Republican senators McCain and Graham promptly pledged to pursue even stronger sanctions in the future. Everyone but the president-elect, it seems, is in agreement on this one.

As the New York Times points out, senior Russian intelligence officials aren't exactly frequent travelers to the United States, so these name-and-shame sanctions, in practice, aren't going to do much. But by shifting the status quo before his successor takes up residence in the White House, President Obama makes it much harder for Trump to interfere with the forthcoming bipartisan congressional investigation into the hacks.

Logically, Trump can't keep the sanctions in place while at the same time denying Russia's involvement in the acts that prompted sanctions in the first place. However, if he were to lift the sanctions, inviting Russian spies back to the United States, he would fuel speculation about the election's integrity and deliver a giant middle finger to U.S. intelligence service members, high-profile allies in the legislature, and, of course, the millions of Americans who have an interest in maintaining a free and fair democracy. An already-historically unpopular president-elect can't afford to pull a stunt like that.

Whatever that investigation eventually reveals won't—and shouldn't—actually change the results of the 2016 presidential contest. But President Obama's eleventh-hour sanctions will hopefully ensure that something like this doesn't happen again.