Israel has released activist Khader Adnan from jail following a deal last month in which he agreed to end a 56-day hunger strike.
His strike had galvanised Palestinians behind a "battle of empty stomachs" campaign against Israeli detentions without trial.
Adnan on Sunday was greeted by dozens of cheering relatives and supporters upon arrival to Arribeh, his hometown in the occupied West Bank.
"I see the happiness among Palestinians flowing and the Palestinian pain and hope for the freedom of all prisoners, God willing," he said.
“The occupation made a mistake in arresting me the first time and the second time and all previous arrests.”
Adnan, 37, had been hospitalised in critical condition as a result of rejecting food since May 4.
He had been under "administrative detention" - a practice in which Israel holds Palestinians without charges or trial - for a year, since soldiers took him from his home last July.
His lawyer Jawad Boulos told Al Jazeera that Israel had pledged to never detain Adnan again under the guidelines of administrative detention, which can imprison Palestinians indefinitely for renewable six-month intervals.
10th detention, six years in jail
It was the tenth time that the father of six, who worked as a baker, had been placed in detention without charge. Adnan had spent a total of around six years in jail.
He has previously been on longer hunger strikes and refused food for 66 days back in 2013.
Al Jazeera's Imtiaz Tyab, reporting from the West Bank, said that Israel had "no choice" but to release Adnan following warnings from rights groups, including the Red Cross, that he was close to death.
Both Israel and Palestinian leaders had feared the threat of Adnan dying could hurt a shaky Gaza truce or lead to an upsurge in violence.
Adnan is a well-known figure in the Palestinian community and a leading figure in the Islamic Jihad political party but had denied that he had ever been involved in violence.
Earlier this month, Adnan's wife Randa told Al Jazeera: "We are very concerned about his health right now. It's getting much worse. We know that he could die if something isn't done quickly."
As his health deteriorated, Adnan was refusing to undergo medical tests or take vitamins, according to the Palestinian Prisoners Society.
"We've been told he cannot stand on his own or walk and that he's shackled to the hospital bed," Randa said. "There are guards watching him at all times."
His family had also been denied visitation rights for "security reasons".
An estimated 426 Palestinians in Israeli lock-up are currently being held as administrative detainees, according to the Ramallah-based Addameer Prisoner Support Network.
Patrick Strickland contributed to this report
Source: Al Jazeera and agencies