WASHINGTON — Republican lawmakers on Tuesday praised the Senate’s 49-46 confirmation of Michael Truncale to a Texas district court judgeship, but several civil rights groups condemned the vote, saying Truncale has denigrated undocumented immigrants and is an “unqualified extremist.”

The vote ended a year-and-a-half confirmation process; President Donald Trump nominated Truncale to the U.S. District Court for the Eastern District of Texas in January 2018 on the recommendation of Texas Republican Sens. John Cornyn and Ted Cruz.

“I have no doubt Texans in the Eastern District will be well served by Michael’s … commitment to the rule of law,” Cruz said. “The Senate is continuing to deliver on its promise to the American people to confirm principled, constitutionalist judges.”

Utah Sen. Mitt Romney was the lone Republican who voted against the nomination.

Truncale spent his career at Texas law firm Orgain Bell and Tucker, representing clients in state and federal courts in Texas. He has served on the Federal Judicial Selection Committee — via appointment by Texas senators — since 2008.

But Truncale has been criticized for his views on key human rights issues, including immigration.

At a candidate forum during his failed 2012 congressional run, Truncale suggested using U.S. troops to secure the southern border.

“With regard to immigration, we must not continue to have the magnets coming in,” he said. The Justice Department said “magnets” referred to entitlement programs that draw immigrants to the U.S.

During the same race, Truncale in June 2011 called then-President Barack Obama an “unAmerican imposter.”

But during his confirmation hearing, he told the Senate Judiciary Committee his Obama comment was the result of his frustration about what he saw as Obama’s “lack of overt patriotism.”

Various human rights organizations had urged members of the Republican-controlled Senate to oppose Truncale’s confirmation.

“Senate Republicans are rolling back our rights and freedoms by pushing through unqualified, extremist and partisan ideologues to lifetime appointments on the federal bench,” Kristine Lucius, an executive vice president at the left-leaning Leadership Conference on Civil and Human Rights, said in a statement Tuesday.

Lucius added that Truncale’s confirmation will politicize courts and that his record shows “hostility to basic civil and human rights protections.”

Truncale’s hesitance to tell a Senate committee whether the landmark Supreme Court case Brown v. Board of Education was correctly decided should disqualify him from the position, Paul Gordon, senior legislative counsel for the liberal advocacy group People for the American Way, said in a statement ahead of the confirmation vote. The ruling, which will be 65 years old Friday, declared laws permitting racial segregation in public schools were unconstitutional.

“The GOP-led Senate is advancing the nomination of a narrow-minded elitist,” Gordon said. “Truncale’s record is one of opposition to the constitutional values of equality and justice.”