RAMALLAH, West Bank, April 23 (Reuters/Ali Sawafta) - 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 al-Issawi, 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 Israeli troops after another Palestinian died while being interrogated in an Israeli jail. The clashes were fueled by the worsening health of Issawi and other prisoners.

Under a deal signed by Issawi 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 Issawi 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 an Israeli soldier held hostage by the Hamas Islamist group in Gaza.

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.

Citing security concerns, Israel restricts Palestinian movement between East Jerusalem and the West Bank - a policy criticized by Palestinians as collective punishment. Israel captured both areas in the 1967 Middle East war, annexing East Jerusalem in a move that has not won international recognition.

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

Issawi'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 Israeli guard and receiving intravenous vitamins but was refusing food.

Palestinians regard Issawi 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 Qaraqa, 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. (Writing by Noah Browning; Editing by Jeffrey Heller and Alison Williams)