Brett Kavanaugh, President Trump’s nominee for the Supreme Court, smiles during a meeting on Capitol Hill last week. (Zach Gibson/Bloomberg News)

President Trump’s Supreme Court nominee made fresh inroads with senators Monday, as he held a lengthy meeting with a Democratic lawmaker and won the support of an unpredictable Republican.

U.S. Appeals Court Judge Brett M. Kavanaugh spent about two hours in the office of Sen. Joe Manchin III of West Virginia, the first Democrat to meet with him. Afterward, Manchin repeatedly called the meeting “very productive,” leaving the door open to supporting Kavanaugh.

“Two hours — we talked about everything,” said Manchin, a centrist facing reelection in a state Trump won overwhelmingly. “It helped me and my staff understand and gives us a lot to work on.”

Later, in a statement, Manchin said he would not make a final decision on the nomination “until I complete a thorough and fair examination of his candidacy.”

Hours earlier, Sen. Rand Paul (R-Ky.), a wild card who has been a thorn in the side of GOP leaders, announced he would support ­Kavanaugh.

Paul said that he had concerns about Kavanaugh’s record on privacy and government data collection. But after meeting with him, he opted to back the appeals court judge, despite their differences.

“No one will ever completely agree with a nominee,” Paul said in a statement announcing his decision. “Each nominee, however, must be judged on the totality of their views, character, and opinions.”

Paul’s choice removes a potential obstacle for Senate Republican leaders, who are looking to confirm Kavanaugh in the fall. The libertarian-leaning senator has frequently bucked party leadership.

While many Republicans believed Paul would ultimately fall in line, the possibility that he would hold out until later this year threatened to complicate matters for Trump and top Senate Republicans.

In a tweet Monday evening, Trump thanked Paul for throwing his support behind Kavanaugh.

“Thank you to @RandPaul for your YES on a future great Justice of the Supreme Court, Brett ­Kavanaugh. Your vote means a lot to me, and to everyone who loves our Country!” Trump wrote.

Republicans hold a razor-thin 51-49 majority in the Senate, making every vote crucial to Kava­naugh’s success or failure. With Sen. John McCain (R-Ariz.) away from the Senate undergoing treatment for a severe form of brain cancer, one Republican “no” vote would be enough to sink Kavanaugh, if all Democrats were to vote against him.

The two biggest remaining Republican question marks are Sens. Lisa Murkowski (Alaska) and Susan Collins (Maine), who favor abortion rights and broke ranks with their party’s effort to repeal and replace the Affordable Care Act last year.

Democratic senators and activists who oppose Kavanaugh have cast him as a threat to the ACA and abortion rights. They have also raised concerns that he has too broad a view of presidential power. Republicans have dismissed their complaints.

Anti-Kavanaugh forces are hopeful that their three-pronged attack will be enough to ­persuade Collins and Murkowski, as well as moderate Democrats, to stand against him. At the same time, those lawmakers are also coming under opposing pressure from conservatives to back him.

Democrats acknowledge that they face a challenging endeavor and that even uniting all the party’s senators against Kavanaugh may not ultimately ­happen.

Senate Minority Leader Charles E. Schumer (D-N.Y.) has promised to fight Kavanaugh with everything he’s got. But he is giving centrist Democrats in his caucus some space to make up their minds.

Manchin is one of three Democratic senators who crossed party lines and voted to confirm Neil M. Gorsuch to the Supreme Court last year. The other two are Sens. Joe Donnelly (Ind.) and Heidi Heitkamp (N.D.).

Like Manchin, both face challenging reelection campaigns in Trump-friendly states.

Donnelly plans to meet with Kavanaugh in August.