Palestinian prisoner Khader Adnan ended a 56-day hunger strike on Sunday after Israel agreed to release him, his lawyer and the Palestinian Prisoners Club announced.
Adnan, 37, has been in prison for a year under administrative detention, which allows imprisonment without charge for renewable periods of six months indefinitely, and his case had been at the heart of concerns in the occupied Palestinian territories.
Officials and activists had recently sounded the alarm, warning that he could die "at any moment".
"Khader Adnan ended his hunger strike last night, after an agreement was reached to release him on July 12," his lawyer Jawad Boulos said, adding that doctors at the Israeli hospital he was transferred to were considered ways to start feeding him.
In a statement, the Palestinian Prisoners Club also confirmed that Mr Adnan had broken his hunger strike.
An Israeli official confirmed that Adnan would be set free on July 12, telling AFP the deal was made possible after Adnan withdrew his demand that Israel never hold him in administrative detention in the future.
The official noted Adnan's deteriorating health and the requests of the International Committee of the Red Cross and Palestinian Authority to release him as contributing to the decision to free him.
Adnan was arrested a year ago, shortly after the kidnapping and murder of three young Israelis, which led to a wave of arrests of hundreds of Palestinians in the occupied West Bank.
He had previously carried out a hunger strike that lasted 66 days in 2012 to protest against his detention. He was released at the end of the strike, during which he had ingested vitamins and salt.
This time, he refused to swallow anything except water.
The Palestinian government had warned it held Israel responsible for his fate, while the Israeli government in mid June relaunched the process of instating a law that would allow prisoners to be force-fed when their lives are in danger.
The Palestinian leadership submitted a report to the International Criminal Court last week that included the treatment of Palestinian prisoners in Israeli jails.