A security guard gestures for African asylum seekers to wait in line to renew their visas at the Population and Immigration Authority office in Bnei Brak, Israel, on Feb. 28, 2018. Most refugees need to renew their visas every two months. (Corinna Kern/For The Washington Post)

Prime Minister Benjamin Netanyahu’s decision to scrap a resettlement plan for 38,000 African migrants living illegally in Israel just hours after announcing it underscores his increasingly precarious position in domestic politics. 

Netanyahu said he arrived at this decision after reviewing the “pros and cons” of what he had initially called an “unprecedented understanding” with the United Nations to deport half the migrants to Western countries and resettle the rest in Israel.

Analysts and media commentators said, however, that Netanyahu clearly capitulatedto political and social media pressure. The reversal also serves as another strong indicator that a general election might be near.

Netanyahu has another year and a half in office, but far-reaching police investigations involving allegations of breach of trust and bribery against the long-serving Israeli leader have seriously weakened his position at the head of a six-party nationalistic coalition, further increasing the possibility of a snap election.

Last month, the government appeared close to a breakdown over a disagreement on the long-running issue of ultra-Orthodox Jews serving in the military. 

That same sense of uncertainty is manifest now as Israel weighs the future of the African migrants in its midst. 

“The government is moving from crisis to crisis, and it will collapse. The question is just when,” said Reuven Hazan, a professor of political science at Hebrew University in Jerusalem. He suggested that it could be as soon as this summer or early next year. 

In the meantime, Hazan said, “everyone is looking for issues that will solidify their support base and is avoiding those that might anger their base.” 

The issue of the African migrants — who entered illegally via Egypt, some more than a decade ago — is a particularly fraught one. Most come from Eritrea and Sudan. They say they are asylum seekers, escaping human rights abuses and war in their native lands. The Israeli government calls them “infiltrators,” job seekers looking for a better life.

Israel is a party to international treaties that prevent the repatriation of Eritrean and Sudanese migrants, who make up the bulk of the asylum seekers in the country. And, in recent weeks, a high court ruling appeared to scuttle an Israeli government plan to deport tens of thousands to a third African country, either Rwanda or Uganda. Both countries have denied agreeing to such a plan. 

In a Facebook post on Monday, Netanyahu presented the short-lived resettlement agreement with the U.N. refu­gee agency as an alternative to that plan. “I needed to get a new deal and it’s even better,” he said. 

Almost immediately, his coalition partners attacked. Education Minister Naftali Bennett, head of the Jewish Home party, tweeted that allowing 16,000 people to stay would “turn Israel into a paradise for infiltrators” and put the government’s credibility “on the line.”

Then members of Netanyahu’s own Likud party spoke out. Culture Minister Miri Regev said she was “very concerned about what appears to be a speedy concession of the fundamental principles of the government’s policy on migration,” local media reported. 

Gideon Saar, a former minister and powerful rival of Netanyahu, called the deal a “mistake.”

“It was just not consistent with the immigration policy of the last three governments,” Saar said. “The natural thing was to withdraw from this agreement, and I am happy Netanyahu did because the damage would have been irreversible.” 

But it was perhaps the thousands of comments and angry responses on social media that pushed the prime minister to reconsider his stance. Within hours of his Facebook post, Netanyahu scrapped the deal. 

“We cannot diminish social networking,” Hazan said. “Netanyahu does not tweet as much as [President] Trump, but he does put up videos on Facebook all the time, and he faced an onslaught.” 

“The question is why was Netanyahu so worried about criticism of the deal?” said Shmuel Sandler, a lecturer of political science at Bar Illan University in Tel Aviv. “If elections were two years from now, then he might have pushed it through. But if he is thinking of elections this summer, then he needs these people.”