Kansas Gov. Sam Brownback will be the next U.S. ambassador at large for international religious freedom, after the Senate confirmed his nomination Wednesday on a close partisan vote.

Making it through the Senate — which required a tiebreaker vote by Vice President Pence after all 49 Democratic senators voted against Brownback, and Republicans, with two of their 51 senators absent, all voted in favor — is just the first challenge that Brownback will face in his new position.

His charge as the religious freedom ambassador, a position created 20 years ago by an act of Congress, is to confront the persecution of believers of many faiths, in a wide array of countries all over the world.

Human rights violations in China. Kidnapped girls in Nigeria. Religious law in Saudi Arabia. Persecution of Muslims in Burma, Christians in Pakistan, and Bahais in Iran. And the list goes on.

“We try to focus on the worst countries and the worst situations in the world,” said Daniel Mark, the chair of the U.S. Commission on International Religious Freedom, an independent body that Brownback will work with as ambassador. “Because each situation is unique — unique in bad ways — it would be hard to rank them.”

Advocates for religious freedom, particularly conservative Christian groups, have been asking the Trump administration to fill the vacant ambassadorship for months. But Brownback, whose tenure in Kansas has been fiercely criticized for his deep tax cuts and who drew Democrats’ concern with an answer in his confirmation hearings about protecting LGBT rights abroad, comes into the job facing an unusually high level of opposition.

“Historically, the vote for these ambassadors has not been deeply or hyperpartisan, and yet here we are. I think he starts off in a weakened political position,” said Shaun Casey, who ran the State Department’s Office of Religion and Global Affairs, a group set to be folded into Brownback’s office, during the Obama administration. “If an administration is really committed to religious freedom, we ought to move to making it a career diplomat position, and the approval process can be really, really sped up, if that’s the case.”

The most recent ambassador in the role was Rabbi David Saperstein, the only non-Christian who has ever held the position. President Obama appointed him in 2014.

Saperstein traveled extensively, often meeting with religious dissidents and groups who claimed religious persecution in foreign countries. “Sometimes even just meeting with these people can put the governments on notice that America is watching, that the world is watching,” Mark said.

At home, the ambassador is supposed to raise concerns within the State Department about religious persecution in countries that the United States deals with. Mark said that when Obama was engaged in trade negotiations with Vietnam, for instance, Saperstein worked on including a bid for stronger laws defending religious minorities in Vietnam as part of the deal.

“[Brownback] will be the voice within the larger apparatus that’s making foreign policy to push the president and the secretary of state,” Mark said, naming the administration’s discussions with China and Saudi Arabia as particularly important diplomatic relationships with a need to add a religious freedom emphasis. “The ambassador can play an important role in making sure the people who actually do the foreign policy, from the president down, care about prioritizing religious freedom.”

Members of the U.S. Commission on International Religious Freedom appointed by both Democrats and Republicans supported Brownback’s nomination. Tenzin Dorjee, a California State University at Fullerton professor appointed to the commission by House Minority Leader Nancy Pelosi (D-Calif.), said the commission relies on an ambassador to elevate its work. “It’s kind of sometimes frustrating that not much is happening, for all we try to advance freedom of religion in China” and several other nations, he said. “I think the ambassador can really convince the State Department to use some of the effective tools we have, like sanctions.”

But Democrats in Congress united against Brownback’s nomination after Sen. Tim Kaine (D-Va.) asked during his confirmation hearing about an executive order that Brownback rescinded that had protected LGBT state employees. Kaine pointed out that people are persecuted based on their sexuality in some countries Brownback might work in as ambassador.

“Is there any circumstance,” Kaine asked, “under which criminalizing, imprisoning or executing people based on their LGBT status could be deemed acceptable because somebody asserts they are religiously motivated in doing so?”

Brownback replied that he didn’t know of a circumstance like that, “but I would continue the policies of the previous administration in working on these issues.”

That wasn’t enough for Democrats in the Senate. “I really would expect an unequivocal answer on that, but my time is up,” Kaine said at the time. Several senators cited LGBT rights in explaining their votes against Brownback’s nomination on Wednesday:

Frank Wolf, a former Republican congressman from Virginia who helped enact the legislation 20 years ago that created this ambassadorship, turned to another aspect of Brownback’s long résumé in government to defend his nomination.

Wolf said that when the two of them served in Congress together, Brownback, who converted to Catholicism and also attends an evangelical church, stood out for his interest in issues of religion. “He was very much involved in human rights and religious freedom. He was always out in front. He and I were the first two members to go to Darfur during the genocide. He came back and he led the effort truly to declare what was happening there,” Wolf said.

Wolf, like several people who work on global religious freedom, named the plight of the Rohingya Muslims in Burma as one of the first priorities for Brownback in the new job.

But Casey warned that any diplomat for the Trump administration may have a tough time finding listeners in the Muslim world, due to Trump’s travel ban on entrants from several majority-Muslim countries.

“How can you go to Syria and talk about [religious freedom] with Muslims and other religious groups, when in fact you’ve said we don’t want any Muslims from your country coming into ours? If we’re practicing a form of religious discrimination ourselves in our country, that undermines it,” he said.

Want more stories about faith? Follow Acts of Faith on Twitter or sign up for our newsletter.