The U.S. Senate voted 51-47 Wednesday to confirm J. Campbell “Cam” Barker to be U.S. district judge for the Eastern District of Texas in Tyler.

Barker replaces U.S. District Judge Leonard Davis, who took senior status in 2015. Barker, who didn't immediately return a call seeking comment, is an assistant solicitor general in the Texas Office of the Attorney General, where since 2015 he's argued appeals for the Lone Star State in state and federal courts. Previously in his career, he was a partner in Yetter Coleman, practicing commercial and intellectual property litigation.

He earned his law degree from the University of Texas School of Law in 2005 and then served as a law clerk for Judge John Walker of the U.S. Court of Appeals for the Second Circuit and Judge William Bryson of the Federal Circuit. He then did criminal appeals in the U.S. Department of Justice and worked briefly as a special assistant U.S. attorney in the U.S. Attorney's Office for the Eastern District of Virginia.

“He has impeccable credentials and a passionate commitment to upholding the rule of law. Cam understands that the duty of a judge is to interpret the law, not to legislate from the bench,” said Texas Attorney General Ken Paxton in a statement.

Sen. Ted Cruz, R-Texas, said in a statement that Barker has one of the “brightest legal minds” in Texas.

“I have every confidence his experience and professionalism will serve Texans in Tyler and the entire Eastern District well,” Cruz said.

The Vetting Room, an attorney-authored legal blog that analyzes judicial confirmations, wrote in February 2018 that Barker, who was born in 1980, is young compared to other federal judicial nominees. He has an impressive resume and “stellar” academic credentials, but his job as solicitor general has placed him in deeply controversial cases, the blog post said. It noted that Barker handled 12 criminal appeals during his time in the Department of Justice. While a special U.S. prosecutor, he led the prosecution against three MS-13 gang members who were convicted of conspiracy and racketeering.

As Texas deputy solicitor general, Barker handled controversial cases to enjoin the Obama administration's Deferred Action for Parents of Americans initiative, and defend Texas' voter ID law, which was struck down as unconstitutional, but is under appeal, according to The Vetting Room. He also sought to intervene in a case to defend the constitutionality of Trump's executive orders restricting travelers from predominantly Muslim countries, the blog said.

Not everyone supported Barker's confirmation. Lisa Cylar Barrett, policy director of the NAACP Legal Defense and Educational Fund, said in a statement that she's alarmed at what Barker's confirmation means for litigants with civil rights claims.

“Barker's record is … rife with efforts to thwart racial justice, including defending Texas' discriminatory voter ID law and the racially biased death sentence of Duane Buck,” Barrett said.

But Sen. John Cornyn, R-Texas, said in a statement that he's grateful that President Donald Trump nominated Barker and that senators supported him.

Cornyn said, “Mr. Barker's record of public service shows his dedication to justice and to his fellow Texans.”