A freed Palestinian prisoner has been given a hero's welcome in the Gaza Strip after ending his hunger strike in an Israeli jail and agreeing to a plea bargain that will confine him to the territory for the next 10 years.

After his release from Israeli custody, Ayman Sharawneh arrived at the Erez Crossing in an ambulance with its siren blaring and red lights flashing as it crossed into Gaza on Sunday evening.

Dozens of Palestinians waved national flags and chanted slogans calling for freedom.

Sharawneh, 53, appeared weak, shaky and shrunken, and was taken to a hospital in Gaza City.

A resident of the West Bank, the former prisoner had been refusing food since last July to protest his incarceration. His lawyer, Jawad Bulous, said Sharawneh accepted the offer of confinement to Gaza, fearing he would be sent to prison for decades in a military court hearing set for Monday.

"The occupation committed two crimes," Sharawneh said, referring to Israel. "Arresting me, and then keeping me away from my family. But in Gaza, I am also with my family," he said, his voice cracking as he spoke from his hospital bed.

Freed and rearrested

Sharawna had been intermittently refusing food for more than seven months.

He was arrested in 2002 and sentenced to 38 years behind bars, but released in October 2011 under terms of a prisoner swap deal.

But he was rearrested three months later and charged with violating the terms of his release, although the evidence against him was kept secret.

His confinement to Gaza means he will be cut off from his family. It is difficult for Palestinians in the West Bank to obtain permission from Israeli military authorities to cross Israel to enter Gaza. The West Bank flanks Israel's east, while Hamas-ruled Gaza borders Israel in the southwest.

Even so, Sharawneh's mother said she was pleased. "It doesn't matter if he goes to Gaza. To be freed is the most important thing," said Zahra Sharawneh. "I hope the people of Gaza greet him and give him the care that he needs."

On February 28, Jaafar Ezzeddine and Tariq Qaadan, ended their three-month hunger strike, pending a hearing on their case. Both have been held without trial since November.

The fourth hunger striker is Samer Issawi, a security prisoner who is currently being held at Kaplan hospital near Tel Aviv after intermittently refusing food for eight months.

Like Sharawna, Issawi was freed under the 2011 swap deal but rearrested last year on charges of violating terms of his release.

Last week, Israeli medics raised the alarm over his state of health, informing the Prisoners' Club, a Ramallah-based NGO, that he had suffered cardiac failure and was at risk of dying after he stopped taking liquids.

About 4,000 Palestinians are in Israeli prisons for crimes ranging from throwing rocks at soldiers to deadly attacks.

West Bank protests demanding their release have repeatedly turned violent in recent weeks.

Source: Agencies