The Senate on Thursday voted 51-42 to confirm Trump nominee Judge Justin Walker to the second-highest court in the country, marking the 199th Article III judge confirmed to this point in the president's term.

The vote was nearly along party lines, with only GOP Maine Sen. Susan Collins joining Democrats in opposition.

Walker will join the D.C. Circuit Court of Appeals, where he previously worked as a clerk for Supreme Court Justice Brett Kavanaugh. Walker also clerked for former Supreme Court Justice Anthony Kennedy and served as an intern for Senate Majority Leader Mitch McConnell and a speechwriter for former Defense Secretary Donald Rumsfeld.

The judge underwent a tense confirmation process, which included allegations of political bias from Democrats over his past comments on the Supreme Court ruling that upheld the Affordable Care Act, also known as ObamaCare. Sen. Richard Blumenthal, D-Conn., even used the photo of a boy with muscular dystrophy who benefited from the ACA to criticize Walker's previous comments against the ruling.

Judge Justin Walker faces the Senate Judiciary Committee in a confirmation hearing.

Judge Justin Walker faces the Senate Judiciary Committee in a confirmation hearing.

WHO IS TRUMP'S DC CIRCUIT COURT NOMINEE JUSTIN WALKER

Walker responded by calling the boy a "hero," but maintained that "I've never spoken against the Affordable Care Act as a matter of policy," just the legal reasoning of the Supreme Court ruling that upheld it.

The Democrats' insistence that Walker is biased may have resonated with one Republican senator, Collins, who voted against Walker Thursday, marking the ninth Trump judge she's voted against.

"While Judge Walker is entitled to hold whatever personal views he chooses, his ideological comments on the very day he was formally installed as a federal judge -- about winning and losing the courts and a war against those who hold views that are different from his own -- prevent me from supporting his elevation to the second highest court in the land," Collins said in a statement.

Collins was likely referencing comments Walker made at his judicial investiture ceremony when he was confirmed to his current post as a district court judge last year.

"Thank you for serving as an enduring reminder that although my legal principles are prevalent, they have not yet prevailed, and although we are winning we have not won,” Walker said, referencing those who opposed his nomination then. “And that although we celebrate today, we cannot take for granted tomorrow, or we will lose our courts and our country to critics who call us terrifying and who describe us as deplorable."

SENATE CONSIDERS CONTROVERSIAL TRUMP CIRCUIT COURT PICK IN SOCIALLY DISTANT HEARING

But all other Republicans backed Walker, and he will join the D.C. Circuit in September when retiring Judge Thomas Griffith officially steps down. Griffith is a George W. Bush appointee, so Walker will not change the ideological balance of the D.C. Circuit, which has a majority of judges appointed by Democratic presidents.

Despite Collins' vote, McConnell, along with nearly all conservative court watchers, enthusiastically backed Walker.

"He served as the tip of the judicial spear against politicians who were more interested in power grabs than public safety during the current COVID19 outbreak — like Louisville Mayor Greg Fischer, who threatened to jail Christians who attended drive-up Easter services but permitted drive-up liquor sales," Mike Davis, the president of the Article III Project,  an organization dedicated to backing Trump judges, said.

Davis is referencing a case Walker ruled on in his role at the Western District of Kentucky. A Louisville church planned a drive-in Easter service, but was told by the city's mayor that it could not go on due to a statewide ban on gatherings from Democratic Gov. Andy Beshear.

Walker, in his ruling, tore into the city's decision.

“On Holy Thursday, an American mayor criminalized the communal celebration of Easter,” he wrote in a sternly worded 20-page opinion. “That sentence is one that this Court never expected to see outside the pages of a dystopian novel, or perhaps the pages of The Onion.”

McConnell has previously heaped praise on Walker, who has been called a protege of the senator.

CLICK HERE TO GET THE FOX NEWS APP

"Judge Justin Walker, the President’s choice to serve on the U.S. Court of Appeals for the D.C. Circuit, is an outstanding legal scholar and a leading light in a new generation of federal judges," McConnell said in a statement upon Walker's nomination to the D.C. Circuit.

In addition to being the 199th total Article III judge confirmed under the Trump administration, Walker is also Trump's 52nd appeals court judge.

McConnell has indicated that he will soon move to confirm another appeals court judge, Cory Wilson, who recently cleared the Senate Judiciary Committee and is set to join the Fifth Circuit Court of Appeals should he be confirmed.

Fox News' Chad Pergram contributed to this report.