President Donald Trump nominated federal appeals court judge Brett Kavanaugh to the Supreme Court on Monday evening, capping a day of reality TV-esque drama in which he managed to keep the decision from leaking—and the country guessing—until minutes before the announcement.

In a ceremony in the White House’s East Room, Trump introduced Kavanaugh, who stood alongside his wife and two daughters, as a judge with “impeccable credentials, unsurpassed qualifications, and a commitment to equal justice under the law.” The president placed particular emphasis on “equal.”

Within minutes of Trump’s announcement, the White House rapid response effort had mobilized. Paul Teller, a senior legislative affairs aide, emailed an “action alert” to supporters, requesting “your public, repeated, and enthusiastic support for this nominee so that the Senate confirms Judge Kavanaugh as soon as possible this fall.”

The email included three separate memos of talking points on Kavanaugh’s biography, his position on “overregulation,” and his position on “religion, life, and conscience.” Metadata in the documents show they were created just an hour before Trump’s announcement.

Monday evening’s announcement followed weeks of jostling among conservative legal advocates who sought to secure the nod for their preferred nominees, but the preeminent organizations that have stewarded Trump’s judicial nominees onto the Supreme Court and other federal courts appeared to have lined up behind Kavanaugh by mid-day.

At around 3 PM, those close to Leonard Leo, the president of the powerful Federalist Society, began circulating a 12-page backgrounder, obtained by The Daily Beast, detailing Kavanaugh’s qualifications for the bench. And within minutes of his announcement, the firm CRC Public Relations, which represents the Judicial Crisis Network, an influential dark money group that pledged to spend eight figures to get Trump’s nominee confirmed, blasted out testimonials hailing Kavanaugh’s qualifications from 20 of his former clerks. A second CRC email contained two photos of the justice with his daughters and a link to a JCN-backed website, ConfirmKavanaugh.com. The site was one of four that JCN set up prior to the announcement—with three others corresponding to the other judges on Trump’s short-list.

Kavanaugh’s behind-the-scenes backers prior to the announcement also included some former clerks for, and other allies of, the late Supreme Court justice Antonin Scalia, to whom Trump has frequently alluded in describing his ideal nominee to the high court, and whom he again hailed at Monday’s ceremony.

“Scalia folks I have engaged with like Kavanaugh. They think he is confirmable and conservative,” said one plugged-in conservative movement source familiar with the behind-the-scenes lobbying efforts prior to Trump’s announcement. “They like Barrett a lot, but they worry about her confirmation.”

But if Trump considered Kavanaugh’s backing from Scalia-world, he also surely knew of his roots in the George W. Bush White House. Asked how Kavanaugh might’ve overcome that perception, one senior administration official pointed to his work on Kenneth Starr’s investigation of President Bill Clinton—and subsequent disavowal of criminal and civil investigations into sitting presidents.

Trump, who is staring down both a federal criminal investigation and a number of civil lawsuits, likely noticed the latter position, the administration official said. “It’s a twofer,” the official joked. In Trump’s mind, “he manages to be both anti-Clinton and anti-Mueller.”

The high stakes announcement on Monday followed a day of wild speculation and tea leaf-reading, designed, some conservatives briefed on the nomination process believed, to prevent a leak of Trump’s decision by flooding the zone with contradictory information. It was a characteristic move by a president who revels in the political press spinning its wheels, and is naturally inclined to the sort of primetime TV drama that he helmed as host of NBC’s The Apprentice.

“There are few people in politics, or entertainment for that matter, who have a better understanding of marketing than the president,” Andy Surabian, a former Trump White House official and a Republican strategist, told The Daily Beast on Monday afternoon. “He gets that modern-day politics is no different than Hollywood, and his grasp of marketing would even make P. T. Barnum proud.”

Over the past days and weeks, President Trump actively solicited advice and opinions from administration officials, friends, allies, and in some cases near-strangers on what they thought of individuals on his shortlist. This has included some of the president’s closest advisers from conservative media. Over the weekend, The New York Times’ Maggie Haberman reported that Trump and Fox News host Sean Hannity had spent time together at the president’s New Jersey golf club on Sunday. Their meeting was played close to the vest such that, according to a source familiar with the situation, Fox News’s own White House reporting team had trouble confirming it was happening.

Furthermore, a source familiar with efforts to sway Trump’s decision said Hannity had used his conversations with the president to try to nudge him toward selecting Judge Amy Coney Barrett for the Supreme Court, though it was not clear if he did so on the golf course over the weekend.

In the end, Hannity’s advice wasn’t enough, as Trump kept many of his loyalists and aides guessing until the very final stretch. It’s the sort of showmanship to which those who work for Trump have become accustomed. But the gravity of the day’s events was not lost on some of Trump’s more senior advisers.

“It’s like a big contest of great importance,” Rudy Giuliani, the president’s personal attorney, told The Daily Beast in an interview, hours prior to the ceremony. Asked if the “showmanship” at play here reminded him of President Trump’s reality-TV days, Giuliani laughed and remarked, “It’s a little more important than that!”

Giuliani claimed that he had tried—and failed—to suss out information on the president’s decision ahead of the announcement. But Trump had been “real cagey” about who will get the nod, or how he was coming to that decision.

“I talked to him twice [on Monday morning], on other things, but I asked him ’cuz I'm nosy, and [President Trump] laughed, and said, ‘I haven't even told people I've made up my mind yet,’” recalled Giuliani, who said that he was attending the ceremony at the White House in the evening. “So I said, ‘How are you gonna get him into the White House?’ And he just said, ‘Leave it up to me.’”

The only thing he could confirm to The Daily Beast—less than six hours before the announcement—about the president’s Supreme Court pick was that “it’s not me!” Giuliani said, laughing.

After Trump’s announcement ceremony wrapped up, Giuliani headed back to Trump International Hotel just blocks from the White House, where he was seen greeting and taking photos with fans.

This story has been updated throughout.