In late July, Senate Majority Leader Mitch McConnell brought with him to the Oval Office a new visitor to meet President Trump: Daniel Cameron, a former aide who was then vying to become the first black attorney general in Kentucky.

When Trump saw McConnell and Cameron at the door, he quickly dismissed Attorney General William P. Barr and other Justice Department officials he was meeting with at the time.

“Hey Mitch, what’s up?” Trump said, according to people familiar with the encounter.

For 25 minutes, the president was “enamored” with Cameron, according to a person briefed on the meeting, smiling as he answered his questions about immigration, the Second Amendment and whether he was “tough on crime.”

Democrats now have control of both chambers of the Virginia statehouse for the first time in over two decades. (The Washington Post)

The July meeting — confirmed by people familiar with it who, like others, spoke on the condition of anonymity to discuss internal events — is one example of how McConnell worked methodically in recent months to pique Trump’s interest in key political races in Kentucky, where the majority leader himself is on the ballot next year.

But Trump and McConnell’s efforts in the Bluegrass State appeared to fall short in Tuesday’s election, as they failed to salvage unpopular Gov. Matt Bevin’s candidacy. Democrat Andy Beshear claimed victory as he led Bevin by roughly 5,000 votes, although Bevin has refused to concede and the Associated Press has not called the race.

McConnell was instrumental in persuading Trump to aid Bevin earlier this year, warning him that a Republican loss in conservative Kentucky would be interpreted as a sign of political weakness ahead of 2020. Trump jetted into Lexington, Ky., in the final hours of the race in an attempt to bolster Bevin, framing the embattled governor’s reelection as a referendum on himself and the House Democrats’ impeachment investigation.

Still, few GOP officials, at least publicly, sought to blame McConnell or Trump for the setback. Instead, Republicans said the fault lay with Bevin, who was consistently ranked as one of the nation’s most unpopular governors.

“I think McConnell’s a good soldier, and he tried to do what was best for the Republican Party,” said Rep. James Comer (R-Ky.), a noted Bevin critic. “From a policy standpoint, we agree with Matt Bevin. It’s just the personality and the way he treats people. That’s where the problem is with Bevin. It’s not his ideology or his agenda. It’s his personality.”

In private, McConnell and Trump have commiserated over Bevin’s prickliness, and the majority leader has repeatedly argued that the results are not a broader referendum on Kentucky or the president, who won the state by nearly 30 points in 2016, according to people familiar with the conversations.

In a post-mortem election phone call, McConnell noted to Trump that the rest of the statewide Republican ticket in Kentucky won with broad margins, and that the problems seemed to be confined to the candidate, those people said. As governor, the abrasive Bevin battled with teachers, denigrated the media and fought with legislators of his own party.

McConnell relayed a similar message to a group of Senate chairmen on Wednesday in a private meeting, when the majority leader argued that the Bevin race was a lot closer because of Trump’s last-minute efforts, and that the quality of a candidate mattered, according to a Republican senator in attendance.

Despite starkly different demeanors and initial skepticism of one another, Trump and McConnell have developed one of the most powerful alliances in Washington that continues to endure, despite political setbacks like Bevin’s apparent loss.

Once distrustful of McConnell, Trump has come to respect him and speaks with him frequently, according to people familiar with their relationship. The majority leader freely doles out advice to the president; at a White House meeting in October, those people said, McConnell encouraged Trump to be careful with his interactions with GOP senators because many aren’t up for reelection next year, while all members of the House are.

“Obviously, President Trump is relatively new to elected politics and Sen. McConnell is not new to elected politics,” said Sen. John Cornyn (R-Tex.), a close McConnell ally who is also in regular contact with the White House. “The way he helps him is by speaking to him candidly behind closed doors and not get into a public fight. I think we’ve all seen that doesn’t work very well.”

Cornyn added: “I’m sure he would’ve invited the president’s participation not just for Bevin, but for the benefit of the rest of the ticket.”

That ticket included Cameron, a former University of Louisville football player and general counsel to McConnell who became the first Republican attorney general in more than seven decades. A rising star in Kentucky political circles, Cameron is being groomed to succeed McConnell in the Senate when he retires.

A senior White House official said Trump viewed Cameron as “out of central casting.”

“Did you see what I’m doing for A$AP Rocky?” Trump asked Cameron at one point during the July Oval Office meeting, according to those familiar with the encounter. At the time, the president was seeking to get the rapper released from a Swedish prison.

Trump suggested the two men take a picture. Then Trump barked at Dan Scavino, his social media adviser, to come into the Oval Office and post a tweet endorsing Cameron and calling him a “STAR.”

“Great going, Daniel, proud of you!” Trump said of Cameron on Twitter Tuesday night, the only state attorney general race on which he commented.

If there were any post-election friction between Trump and McConnell behind the scenes, it wasn’t apparent on Wednesday, which began with the president boasting that McConnell will “win BIG” next year, based on Tuesday’s results. McConnell, 77, is running for a seventh term against Democrat Amy McGrath, a Marine fighter pilot who fell short in a contest against Rep. Garland “Andy” Barr (R-Ky.) last November.

It continued later at a White House ceremony marking the dozens of federal judges who have been confirmed since Trump took office in January 2017 — a top priority of McConnell, who singularly engineered a blockade of former president Barack Obama’s judicial nominees in Obama’s final two years to leave dozens of judicial vacancies for his successor.

In addition to Supreme Court Justice Neil M. Gorsuch — who filled a vacancy that was created 11 months before Obama left office — and Justice Brett M. Kavanaugh, Trump has nominated 112 district court judges and 44 judges to the appellate courts.

“You know, I always get up and I talk about the economy,” Trump said during the White House event Wednesday. “But then Mitch will follow me. He’ll talk about judges always and it’s great what you’ve done. Incredible. The impact is truly amazing.”

As attendees in the East Room applauded, Trump added: “Generations from now, Americans will know that Mitch McConnell helped save the constitutional rule of law in America.”