WASHINGTON ― The president who railed against the Republican establishment and savaged the presidency of George W. Bush on his way to winning the White House is now taking a victory lap for putting a Bush acolyte onto the Supreme Court.

Brett Kavanaugh, confirmed by the Senate on Saturday as an associate justice, served as a White House lawyer for Bush for two years and then as his staff secretary ― one of White House’s top positions ― for three.

“President McConnell’s appointee to the court is exactly consistent with the establishment wing of the party’s preferences,” mocked Rick Wilson, a longtime GOP consultant and prominent Donald Trump critic, referring to Senate Majority Leader Mitch McConnell (R-Ky.). “This is not Donald Trump’s selection. This is Mitch McConnell and the Federalist Society’s selection. The irony is amazing.”

Rather than installing a “populist nationalist” in the mold of former top aide Stephen Bannon or top immigration adviser Stephen Miller, Trump gave a lifetime appointment to the highest court to a former confidante of Bush, the embodiment of the GOP establishment.

For his part, Kavanaugh boasted of that relationship in his testimony before the Senate Judiciary Committee.

“I was by President Bush’s side for three years and was entrusted with the nation’s most sensitive secrets,” he said. “I traveled on Air Force One all over the country and the world with President Bush. I went everywhere with him, from Texas to Pakistan, from Alaska to Australia, from Buckingham Palace to the Vatican.”

The irony, however, will be lost on Trump’s hardcore supporters, said Rick Tyler, a Republican consultant who backed Texas Sen. Ted Cruz’s presidential run in 2016. “They don’t know enough to care,” he said, adding that even if they learned about Kavanaugh’s background, they still wouldn’t care. “You can’t apply logic or ideology to Trump. He’s a celebrity. They’ll make it all make sense retroactively.”

White House spokesman Hogan Gidley said Trump and Bush spoke Saturday after the Senate’s confirmation vote. “President Trump and former President George W. Bush had a congratulatory phone call to celebrate Justice Kavanaugh’s confirmation,” he said.

While Trump seemed to focus on attacking the woman who testified under oath that Kavanagh tried to rape her when they were both in high school ― Trump openly mocked her at a campaign rally last week ― Bush quietly worked the phones persuading Republicans senators to support his former aide.

Maine’s Susan Collins, whose decision to support Kavanaugh provided the likely deciding vote, said Bush called her several times to lobby her to vote yes.

Trump has attacked for years the Bush family’s pro-immigration views and accused the former president of supporting “open borders.” Trump also has repeatedly attacked Bush for his invasion of Iraq ― even though Trump supported it at the time ― as “one of the worst decisions in the history of the country.”

During the 2016 GOP presidential primary campaign, he attacked rival Jeb Bush, the 43rd president’s brother, for saying that illegal immigrants come to the United States in “an act of love” to better care for their families. He also scoffed at the younger Bush for being “low energy,” while never defining what that even meant.

Trump outsourced his high court appointments to the Federalist Society and the Heritage Foundation, two groups dedicated to loading the federal judiciary with conservatives opposed to abortion rights and in favor of strict limits on business regulations.

Kavanaugh, whose name was not on the original list of 21 Trump released as a candidate, was added last November along with four other names, with the concurrence of the two outside groups.

Some critics have pointed to Kavanaugh’s law review article he wrote in 2009 in which he opined that sitting presidents should not be prosecuted as the only reason Trump appointed him ― given the danger posed to Trump’s tenure in office by special counsel Robert Mueller’s investigation.

“I think he cares a great deal about who’s on the Supreme Court,” said John Weaver, who ran Ohio Gov. John Kasich’s campaign for the GOP presidential nomination in 2016.