RAMALLAH, West Bank - A Palestinian prisoner whose hunger strike had stoked weeks of protests in the West Bank ended his eight-month on-off fast on Tuesday in exchange for early release by Israel, Palestinian officials said.

Israeli and Palestinian officials had feared that had Samer Essawi, 32, died because of refusing food, it might have led to mass unrest.

At least six Palestinian protesters were wounded in February in clashes with IDF soldiers after another Palestinian died while being interrogated in an Israeli jail. The clashes were fueled by the worsening health of Essawi and other prisoners.

Under a deal signed by Essawi and a military prosecutor, he will serve eight more months for violating bail conditions from an earlier release, the officials said, announcing he had ended the strike.

He will then be allowed to go to his Jerusalem home, Qadura Fares, head of the Palestinian prisoner organization, told Reuters.

Israel convicted Essawi of opening fire on an Israeli bus in 2002, but released him in 2011 along with more than 1,000 Palestinian prisoners in exchange for Gilad Schalit.

He was re-arrested last July after Israel said he violated the terms of his release by crossing from his native east Jerusalem to the West Bank, and ordered him to stay in jail until 2029 - his original sentence.

Both Palestinian and Israeli officials have visited Essawi frequently to reach a compromise and prevent the violence his death could have provoked, potentially further complicating any peace efforts.

Essawi's lawyer and sister had conveyed the offer, which was brokered by Israel and Palestinian officials, to his bedside in Israel's Kaplan hospital, where he had been under guard and receiving intravenous vitamins but was refusing food.

Palestinians regard Essawi and the prisoners as heroes of their struggle for statehood and welcomed the news of the deal.

"I consider this a great victory and a reversal (to Israel)" said Issa Qaraqea, Palestinian minister of prisoners. "This isn't just a personal achievement for him, but one for the sake of all the prisoners and citizens who want freedom."

Israel holds some 4,800 Palestinians it accuses of committing or planning violence against it. Palestinian official say 207 Palestinian security prisoners have died in Israeli jails since 1948.

Please LIKE our Facebook page - it makes us stronger