“This was a very competitive election with three highly qualified candidates,” a U.S. State Department spokesperson said in a statement. “We congratulate the winner and look forward to working with” him. “IOM is an important partner for the United States around the globe, and we are committed to working with IOM to address root causes of migration and to promote safe and legal migration.”

The development was not unexpected. The backlash against Isaacs’s nomination began almost as soon as it was announced in February. The Washington Post unearthed social-media posts in which Isaacs made comments that were widely seen as disparaging of Islam and Muslims. In one he tweeted: “If Islam is a religion of peace, let’s see 2 million Muslims in National Mall marching against jihad & stand for America! I haven’t seen it!” He criticized the Obama administration’s decision to increase the number of Syrian refugees accepted by the U.S., saying while “most of the refugees are fine people … there are real security risks and this can’t be swept under the rug.” He also said the U.S. should preferentially admit Christian refugees from Syria because they “can never return.” Subsequently, CNN reported that Isaacs tweeted that Austria and Switzerland should consider building a wall in the Alps “to control their borders from refugees.”

When confronted with the posts, Isaacs, via the State Department, said he regretted that his “comments on social media have caused hurt and have undermined my professional record.” Additionally, he said: “It was careless and it has caused concern among those who have expressed faith in my ability to effectively lead IOM. I pledge to hold myself to the highest standards of humanity, human dignity and equality if chosen to lead IOM.”

But the opposition to the nomination only grew. Hundreds of aid groups wrote to the IOM, asking its members to vote for a director general with a record of “condemning xenophobia, discrimination and intolerance.” And this week, Eric Schwartz, the president of Refugees International, wrote in the Post that Isaacs’s “regrettable statements must be disqualifying.”

The IOM, which was set up in the aftermath of World War II, coordinates the global response to worldwide migration, including that of refugees, and became a UN agency in 2016. At present it coordinates the international response to the migrant crisis in Europe as well as the Rohingya crisis along Myanmar’s border with Bangladesh. The job of its director general would have been to represent the values of the IOM and the UN system, not the U.S. government position on migration.

But the Trump administration’s policies on families at the U.S. border with Mexico, its travel restrictions on citizens from five Muslims or predominantly Muslim countries, and the president’s own remarks about Muslims and refugees would have likely placed an American director-general in an awkward position. As Jeremy Konyndyk, who was the Obama-era director of the office of foreign-disaster assistance, wrote in IRIN, the website that covers humanitarian relief:

This naturally raises the question—would Isaacs, if elected, join his UN peers in condemning Trump’s family separation policy? Against the backdrop of the migration policies of the administration that nominated him, his position on this cuts to the core of his credibility as the potential leader of IOM. Unlike most past IOM chiefs, Isaacs is a dust-on-his-boots relief operator rather than a diplomat or migration expert – so there is little indication of his migration policy views beyond his inflammatory social media statements. And while he kicked off his campaign with a quasi-apology after reports of those social media posts emerged, he has never fully repudiated his attacks on Muslims, descriptions of refugees as security threats, and mockery of climate science. For the proposed head of an organization whose roles include coordinating global migration policy, supporting refugee resettlement, and mitigating potential climate disasters, these stances create more than a bit of awkwardness.