There isn’t much that President Donald Trump would say Barack Obama got right in his eight years as president, but Obama’s criticisms of how George W. Bush viewed America’s role in the world must sit well with Trump.

Obama ran for office promising to correct for Bush’s “foreign policy based on a flawed ideology,” namely democracy promotion abroad. Team Obama tacitly endorsed “the responsibility doctrine,” which posited that American withdrawal from volatile regions like the Middle East would force the locals to take responsibility for their own affairs. This is not a policy you can embrace without adopting a set of condescending assumptions about regional actors. And when the nations and peoples for whom Obama had such disdain reciprocated the sentiment, the 44th president made few efforts to conceal his resentment for the small minds in the Middle East.

Obama’s conceit, according to an astute analysis by Brooking Institution Fellow Shadi Hamid, was an expression of hubris. “He wanted others, friends and enemies alike, to act rationally in what he thought was their own interest,” he wrote. The kind of “cool rationalism” Hamid says Obama expected of others was also evident in himself, and it led him toward more than a few moral compromises in the pursuit of what he defined as immediate U.S. interests. The Obamans convinced themselves that the Iranian mullahs, Bashar al-Assad, Vladimir Putin, Mohamed Morsi, and Raul Castro were representatives of the world as it was, not as we might like it to be. And so, the administration embraced an amoral foreign policy, accepting or even rehabilitating these unsavory elements to facilitate cooperation and achieve our mutual objectives.

Leave it to Donald Trump to show Team Obama how wrong they were.

The Kingdom of Saudi Arabia’s egregiously criminal and strategically inept conduct amid the Jamal Khashoggi affair is truly staggering, but the only people who seem incapable of being staggered is the foreign-policy team in the White House. When it comes to Saudi Prince Mohammad Bin Salman (known as MBS), President Trump has made a conspicuous display of denying the undeniable and defending the indefensible.

The Trump administration was right to invoke the Magnitsky Act and to sanction 17 Saudi officials in relation to their now admitted involvement in the gruesome murder of a journalist, but the White House stopped short of targeting MBS. The president has gratuitously antagonized critics of his morally deficient approach to this crisis—questioning the validity of intelligence assessments implicating MBS in the killing while praising Riyadh’s efforts to keep oil prices low and provide the United States with direct foreign investment. That kind of childish defiance is both typical and entirely unnecessary. And yet, the amoral realpolitik considerations this administration has invoked are indicative of the kind of rational foreign policy that should be familiar to Team Obama.

Just like the Obama administration, the Trump White House is dealing with the world as it is. Like the Obamans, this administration is engaged in a historic effort to engineer a sea change in the region, and MBS is the key to its success. His efforts to introduce liberal reforms domestically and to organize the region’s Sunni powers into a bloc in opposition to Shiite forces organized around Iran represents a genuine breakthrough. Among other things, it has meant Riyadh’s abandoning persistent grievances with Israel. As Team Obama well knows, the prospect of a radical redefinition of the status quo in the Middle East can be intoxicating.

As the last administration also knows, losing the devil you know to the devil you don’t—a devil that might be less inclined toward cooperation—can be paralyzing. From the Iran nuclear deal to the opening of Cuba, Obama routinely warned his domestic critics that their opposition empowered hardline elements resistant to liberalization and transparency. MBS, too, faces a very real threat from members of the Al Saud family who resent his heavy-handed reforms.

Given the parallels, you might think Team Obama and its allies would have some sympathy for the predicament Riyadh’s recklessness has created for the United States, even if Trump’s personal conduct in this instance is needlessly provocative. To the contrary—former members of the Obama administration have taken the opportunity to cast aspersions on Trump from great moral heights.

Obama’s former United Nations Ambassador, Samantha Power, insisted that Trump’s apologetics for thuggish regimes in the Philippines, Russia, Egypt, and the Saudi Kingdom were materially distinct from the Obamans’ efforts to downplay the abuses of thuggish regimes in Cuba, Venezuela, and Iran. Secretary of State Mike Pompeo’s reaffirmation of the U.S.-Saudi alliance was, in her view, “a green light for would-be murderers in countries that have things Trump thinks we need.”

Former Deputy National Security Adviser Ben Rhodes has taken this opportunity to attack Trump over his support for the Saudi-led war in Yemen. He even went so far as to boost the propagandist notion that Iran’s support for its Houthi proxies was not the cause of that war (a conflict that began under President Barack Obama and which his White House fully supported, atrocities and all).

Ned Price, Obama’s national security council spokesman, suggested that the only reason the president would question the validity of intelligence estimates implicating MBS in Khashoggi’s murder is that “Trump and his associates have profound financial interests” in Saudi Arabia.

“Utter disgrace,” former National Security Adviser Susan Rice wrote before highlighting an attack on Sec. Pompeo’s efforts to minimize the importance that human-rights promotion plays in the conduct of foreign policy. But the Obama administration quite famously took a hands-off approach with human rights abusers not just in places like Iran, Venezuela, and Syria but also China, Burma, Sudan, and Congo. And all in the name of a rational foreign policy.

The tragedy is that these Obama administration officials are right. Donald Trump’s presidential pronouncement—“maybe he did and maybe he didn’t!”—is truly craven. A virtuous foreign policy will never be one that is purely realist. Nor would a purely realist policy be an effective way of preserving American interests abroad. Both Trump and Obama’s bloodless, equivocating rationalizations and dismissals of that which was right in front of their faces sacrificed as much or more American political capital than they preserved. Team Obama knows it, too. Members from the previous administration recognize the tradeoffs in Trump’s policy, and they see that those tradeoffs aren’t worth it. The tragedy is that it took this long to recognize their mistakes.