The new plan — promoted by Interior Minister Aryeh Deri, of the ultra-Orthodox Shas party, and Gilad Erdan, the public security minister, who is from Mr. Netanyahu’s conservative Likud Party — is the latest phase of a long-running political and legal struggle over the African migrants’ fate.

Critics have denounced the campaign as an effort to distract from corruption investigations against Mr. Netanyahu, and have asserted that the timing is political, given the whiff of possible early elections in the air. In the past, threats to jail the migrants en masse have not been realized, not least because of the cost and a space shortage in prisons.

About 60,000 migrants have surreptitiously crossed into Israel over the once-porous border with Egypt since 2005, most of them Sudanese or Eritreans who cannot be sent back home because of international conventions that prevent the repatriation of asylum seekers to home countries where they could face persecution.

Israeli officials insist that most of the Africans were not fleeing persecution, but came as economic migrants looking for work.

After protests by the residents of south Tel Aviv, where the new arrivals were concentrated, Israel announced in 2012 that it was stepping up efforts to deter, detain and deport the migrants. Measures including the construction of a steel barrier along Israel’s border with Egypt have since cut the flow of African migrants to almost zero. None arrived in 2017, according to the immigration authority.

A detention center, known as Holot, which was built in the desert to house up to 3,000 migrants who entered illegally, is to close down soon, after the Israeli Supreme Court placed limits on the time migrants could be held there and the authorities found it to be no longer effective in encouraging them to leave Israel.

The process of seeking asylum in Israel is a slow one. Of nearly 14,000 asylum applications submitted by Eritrean and Sudanese migrants to the Israeli authorities over the last five years, only 10 people have been granted refugee status — eight from Eritrea and two from Sudan, according to Ms. Sadot and the United Nations refugee agency.