The Republican-led Senate on Wednesday narrowly approved Sam Brownback's bid to be U.S. ambassador for international religious freedom, setting the stage for him to resign the governorship in Kansas after seven contentious years in office.

With two Republican senators absent, Vice President Mike Pence traveled to Capitol Hill to cast the tie-breaking vote to confirm Brownback, a favorite of Christian conservatives for his views on same-sex marriage and abortion. The vote was along party lines, 50-49, underscoring the narrow margin Republicans hold. Pence's vote also was needed earlier in the day to get Brownback's nomination over a procedural hurdle.

Fellow Republican Lt. Gov. Jeff Colyer will be elevated to governor in Kansas once Brownback submits his resignation. That could come as early as next week.

"I'm glad to have the vice president in my corner," Brownback told reporters after a meeting with Kansas legislative leaders at the statehouse in Topeka. He added later, "I'm happy. It's a critical job. I'm excited about being able to do it."

Brownback served in the U.S. Senate before becoming governor in January 2011. He made Kansas an economic laboratory for the nation by aggressively cutting taxes, arguing that they would provide "a shot of adrenaline to the heart" of the state's economy.

But persistent budget problems followed, along with court mandates to boost spending on public schools. Kansas became an example even for conservatives of how not to do trickle-down economics. Voters turned on his legislative allies in 2016, and bipartisan majorities rolled back most of the cuts last year over Brownback's veto.

President Donald Trump's selection of Brownback for the State Department post had come under fire from Senate Democrats and LGBT rights groups. During his confirmation hearing last year, Brownback declined to unequivocally declare there is no situation that would allow a country to cite religious freedom as the basis for criminally prosecuting LGBT people.

Sen. Robert Menendez, D-N.J., said Wednesday that he was concerned Brownback would focus solely on protecting Christian minorities.

"I firmly believe that anyone seeking to represent the United States of America must actively champion the right of all people to worship freely and without fear," Menendez said.

The advocacy group GLAAD said in a statement that Brownback's "distortion of 'religious freedom' threatens LGBTQ people both at home and abroad."

Kansas' senators, both Republicans, applauded the confirmation, saying Brownback is ideally suited for the job.

"Sam Brownback has always been called to fight for those of all faiths," said Sen. Pat Roberts.

Trump announced he'd picked Brownback for the religious freedom post in July, and the Senate Foreign Relations Committee held his confirmation hearing in early October. But the Senate left town for the year without acting on his nomination. The White House resubmitted the nomination earlier this month.

Brownback also would leave a Kansas legacy of far tougher restrictions on abortion and fewer limits on gun owners than when he won the first of his two terms in 2010.

He also rejected expanding the Medicaid health program for the poor in line with former President Barack Obama's signature health care law even as several other Republican governors went ahead.

Brownback was an early advocate of U.S. action to stop genocide in Sudan's Darfur region, and visited Congo and Rwanda to decry humanitarian crises and call for better coordination in foreign aid programs.

___

Associated Press writer John Hanna in Topeka, Kansas, contributed to this report.

___

Contact Richard Lardner on Twitter at http://twitter.com/rplardner