The Israeli government’s plan for deporting illegal African migrants collapsed on Tuesday after High Court interventions and a prolonged campaign of protests from migrants, rights activists, center-left politicians, lawyers and immigration experts.

The government notified the High Court on Tuesday that the plan had been cancelled due to failure to salvage an agreement with a third country to take in the deportees.

“At this stage there is no possibility of implementing involuntary deportations to a third country. Therefore, as of April 17, 2018, [the state] has ceased to hold hearings as part of the deportation policy, and no more deportation decisions will be made at this time,” the state said.

With immediate threat of deportation lifted, the government statement said migrants with expired temporary residency permits will be able to get their visas renewed.

The third country in question was said to be Uganda. Earlier in April, a similar deal with Rwanda reportedly fell through.

The government was seeking to meet the High Court’s demand for a safe resettlement of migrants under detention, or to release them. Some 258 detainees have been released as a result of the state’s inability to fulfill the Court’s criteria.

The deportation plan, which offered each migrant $3,500 and a plane ticket to third-party countries, was furiously attacked by critics in Israel and abroad as a violation of international law which prohibits involuntary repatriation in cases where deportees would be vulnerable to persecution.

A compromise proposal put forth last month, which called for deportation of only half the approximately 35,000 migrants (mostly adult males) while allowing women, children and the elderly to stay in Israel, was rejected by members of the coalition.

Opposition MKs hailed the news on Tuesday. Zionist Camp MK Shelly Yachimovich called it “a welcome step that will save Israel from committing a serious and harmful act.”

Several Meretz MKs exulted, describing it as “a great victory for civil society, moralists and human rights defenders… Now, a decade late, the time has come to stop the incitement against asylum seekers and to act vigorously to strengthen south Tel Aviv and to aid in the absorption of asylum seekers.”