The U.S. Senate on Thursday narrowly confirmed President Donald Trump's controversial nomination of Wendy Vitter to the federal bench in Louisiana on a 52-45 vote.

Vitter, who is married to former U.S. Sen. David Vitter, R-La., secured a lifetime appointment as U.S. district judge for the Eastern District of Louisiana in New Orleans.

Louisiana's U.S. Sens. Bill Cassidy and John Kennedy, both Republicans, supported Vitter's initial nomination last year and continued to lobby for her confirmation when she was nominated again this year.

"Congratulations to Wendy on being confirmed by the full Senate today,” Cassidy said. “She is immensely qualified to serve, and I wish her success in upholding the Constitution on behalf of the good people of the Eastern District.”

“Wendy is whip smart and articulate," Kennedy said. "She understands and appreciates the rule of law. She will serve the state of Louisiana well.”

Vitter, who serves as the attorney for the Catholic Archdiocese of New Orleans, was first nominated in 2018, but had to be nominated again after the clock ran out on the 115th Congress without a vote from the full Senate.

She wasn't presented to the full Senate then because there was a question on whether she had the votes.

Vitter's nomination was controversial because of her past public anti-abortion views and activism and her testimony last year in the Senate Judiciary Committee.

During that testimony, Vitter refused to answer whether she thought the Brown v. Board of Education U.S. Supreme Court ruling outlawing racial segregation in schools was "correctly decided."

On Tuesday U.S. Sen. Richard Blumenthal, D-Conn., tweeted: "The only reasonable answer to my question do you think Brown v. Board of Education was correctly decided is a resounding yes. Vitter defiantly declined to answer. Brown is more than just a historic ruling, it is about core values & principles that binds & bonds our democracy."

Other Democrats also voiced their disapproval this week.

But the Republican majority was able to carry the day for Vitter Thursday.

Vitter is also a former Orleans Parish assistant district attorney.

Greg Hilburn covers state politics for the USA TODAY Network of Louisiana. Follow him on Twitter @GregHilburn1