Israeli Prime Minister Benjamin Netanyahu announced Monday he would scrap controversial plans to deport African asylum seekers, saying he had reached an “unprecedented understanding” with the United Nations to help resettle many of those migrants in Western countries. Many others would be allowed to remain in Israel.

But just hours later, Netanyahu hit the brakes — writing on Facebook that he would suspend the new plan until he had met with delegates from southern Tel Aviv, where many African asylum seekers now live. 

The sudden shift reflects how nettlesome the issue of African migrants has become in Israel, and Netanyahu appeared hesitant to anger his core supporters, many of whom oppose letting large numbers of migrants in the country.

In the initial statement released by Netanyahu’s office, Israel said it was working with the United Nations to resettle at least 16,250 migrants in Western nations under the plan, which would be carried out in stages over five years. Netanyahu later said at a news conference that Israel would offer temporary residency status to the same number of asylum seekers as were resettled in Western nations.

As Israel weighs a controversial plan to deport African asylum seekers, The Post spoke with a family who feared their son would be deported. (Quique Kierszenbaum, Joyce Lee, Jesse Mesner-Hage/The Washington Post)

About 38,000 Sudanese and Eritrean migrants live in Israel. Most of them entered the country illegally via the land border with Egypt before a border fence was completed in 2012.

The Office of the U.N. High Commissioner for Refugees ­(UNHCR) said a joint working group would come up with a plan for African migrants in Israel. Under the agreement reached with Israel, the agency said, it would work with other countries to facilitate the departure of asylum seekers from Israel under various programs, including sponsorship, resettlement, family reunion and labor migration schemes.

“This agreement will ensure that protection is provided to those who need it,” said Volker Türk, the UNHCR assistant high commissioner for protection, who signed the agreement on behalf of the United Nations.

There still appeared to be major details to arrange.

Netanyahu told reporters on Monday that Canada, Italy and Germany could be among the countries where migrants would be resettled. Representatives of those countries did not respond to requests for comment Monday, but the German Embassy in Israel told the Haaretz newspaper that it was not aware of any proposal and Italian media reported that Rome was not a party to any agreement on the asylum seekers.

Many of the migrants have flocked in recent years to neighborhoods in southern Tel Aviv, rapidly changing the historically working-class areas into what has become known as “Little Africa” and sparking tension with the local Jewish population.

Israel had begun handing out notices to male African migrants in February, warning them they had two months to leave the country or face jail. Those migrants were offered $3,500 to relocate to an unnamed “third country” — widely reported to be Uganda or Rwanda — or return to their home country.

Advocacy groups working on behalf of the migrants had challenged the deportation plans in Israel’s high court, securing a temporary freeze on the plan on March 15.

Moves to expel African asylum seekers were largely popular with the right-wing government’s base, which views them as economic migrants who entered the country illegally in search of work. But liberal Israelis argued that many of the ­migrants would face persecution if they returned home, with some critics of deportation comparing the asylum seekers’ plight to that facing Jews fleeing Nazi Germany.

The Israeli government pushed back against critics, in particular those who labeled the deportation policy racist, noting that thousands of Ukrainian and Georgian migrants were deported last year without being offered the relocation payment that was being offered to migrants from Sudan and Eritrea.

Netanyahu’s office noted that the initial plans to send the migrants to third-country destinations had encountered legal constraints and political difficulties and that the government had to adopt a new approach as result.

Larry Bottinick, the acting ­UNHCR representative in Israel, said that the United Nations had been speaking to the Israeli government about a similar plan for years but that the number of asylum seekers who would be allowed to stay in the country had been a sticking point in talks. Bottinick said that several legal developments in the third-country destinations had interfered with Israel’s plan to send the migrants there, in turn leading to renewed talks between the UNHCR and Israel, with deliberations gathering speed over the past few weeks.

Under the new plan, the Israeli government would set up a body to carry out a “rehabilitation plan” for neighborhoods in southern Tel Aviv. The UNHCR said it would work with the Israeli government to develop programs to encourage some Eritrean and Sudanese asylum seekers to move out of Tel Aviv neighborhoods. Training for jobs in solar energy, agriculture and irrigation would be offered, the agency said. Bottinick said that one aim would be to train asylum seekers in sectors where they have a competitive advantage. “Then they could actually make their way abroad in a voluntary way and provide skills that are needed overseas, with Israeli technology,” Bottinick said.

Some pro-migrant groups had welcomed the decision. The Hotline for Refugees and Migrants, a group that advocated for asylum seekers, welcomed the news, noting that it was symbolic that the announcement had happened during Passover, “the holiday of freedom.”

But many felt that the decision had come out of the blue.

“I was really surprised,” said Yonatan Jakubowicz, founding director of the Israeli Immigration Policy Center. “I don’t think anyone was expecting it in Israel.” Jakubowicz, a supporter of the previous policy, said he hoped the agreement with the UNHCR would be a positive, but he said many Israelis were hoping to see more migrants leave.

 “The government will face opposition,” he said.