The government said Tuesday that it has abandoned its plan to forcibly deport African migrants who are in Israel illegally.
The government had been working for months on an arrangement to expel thousands of mostly Eritrean and Sudanese men who arrived in Israel through Egypt's Sinai Desert.
In a response to Israel's Supreme Court, which has been examining the case, the government wrote, "At this stage, the possibility of carrying out an unwilling deportation to a third country is not on the agenda."
The migrants will once again be able to renew their residency permits every 60 days, as they were before the deportation push, the government said.
The migrants and rights groups claim they are seeking asylum and are fleeing war and persecution. The government says they are job seekers and that it has every right to protect its borders.
Despite Tuesday's climb down, the government said immigration authorities would still try to deport migrants voluntarily, drawing criticism from rights group Amnesty International.
Prime Minister Benjamin Netanyahu later said that after failing to reach an agreement with any country to take them in, he would try to draft legislation that would allow the reopening of detention centers in Israel for the migrants.
Public Security Minister Gilad Erdan tweeted on Tuesday: "I repeat: There is no point in reopening Holot [detention facility] without passing the 'override bill' [legislation that would give the Knesset power to overrule High Court decisions revoking laws] and rewriting the parts of the law canceled by the High Court, which allowed the Holot facility to serve as an incentive to encourage infiltrators to leave the country."
The government's reversal was welcomed by those facing deportation.
"I'm thrilled. I'm speechless. I was so scared every day. If I can stay here it will be good, I've lived here so long. I have a job. I have Israeli friends. I am used to the place," said Ristom Haliesilase, a 34-year-old Eritrean who lives in Tel Aviv and works as a carer for the elderly.
Around 4,000 migrants have left Israel for Rwanda and Uganda since 2013 under a voluntary program, but Netanyahu has come under pressure from his voter base to expel thousands more.
The headquarters of a pro-deportation group based in south Tel Aviv – home to one of the largest concentrations of illegal migrants – criticized the government.
"The state has long since lost its credibility and ability to govern. All the earlier solutions [to the migrant crisis] were dismissed out of hand by the High Court of Justice, and the residents of south Tel Aviv are stuck in the terrible reality the migrants have created in the city's southern neighborhoods," the group said in a statement.
The south Tel Aviv activists said that now is the time for the government to pass the override bill.
"The government must take back governance. The High Court can't rule over the country; our fate can't be left in the hands of people who don't care about the citizens of Israel," the group said.
After pulling out of a U.N.-backed relocation plan a few weeks ago, Israel shifted efforts towards finalizing an arrangement to send the migrants against their will to Uganda.
A number of migrant rights groups then petitioned the Supreme Court to block any such policy.
Amnesty also welcomed Tuesday's decision but criticized Israel's plan to continue with voluntary deportations.
"In reality, there is nothing voluntary about them. Eritrean and Sudanese asylum seekers agree to them under pressure. Israel remains under the obligation not to transfer anyone to a country" where they would be unsafe, said Magdalena Mughrabi, Amnesty deputy director for the Middle East and North Africa.
Amnesty will closely monitor the deportations, it said.
The group Stop the Deportation put it more bluntly, saying, "There is no third country and there won't be any third country. It's time for the government to find real, long-term solutions for the asylum seekers and the residents of south Tel Aviv that will address the issues that have been created over the course of years.
"There needs to be a stop to the wool being pulled over people's eyes. Every shekel wasted on inciteful, hateful campaigns is a shekel that should be invested in the absorption and relocation [in Israel] of the asylum seekers."