A Palestinian prisoner held by Israel has agreed to end an on-off hunger strike on Monday which lasted for more than eight months in exchange for an early release, Palestinian officials told Reuters.

The fast by Samer Issawi, 32, from a suburb of Jerusalem, had stoked weeks of street protests and concerns by Israel that his death might lead to mass unrest.

Issawi agreed on a deal brokered by Israeli and Palestinian officials to serve eight months for allegedly violating bail conditions for an earlier release, after which he will be freed to his Jerusalem home, Qadura Fares, head of the Palestinian prisoner organization, told Reuters.

Issawi's lawyer and sister conveyed the offer just before midnight to his bedside in Israel's Kaplan hospital, where he had been under Israeli guard and receiving intravenous vitamins but was refusing food.

Details of the agreement will be presented Tuesday morning to Israel's military court and, following that, Issawi will describe the unfolding of events that led up to the deal.

The prisoner's lawyer, Jawad Boulos, told Haaretz that under the agreement Issawi will serve a total of 18 months, from which the eight months he has served since July will be deducted, and will not need to stand trial for other offenses since he will be granted pardon by the president.

The Palestinian Prisoners Society defined the agreement as victory of Issawi's determination and his great struggle against his administrative detention.

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, both majority-Palestinian areas, and ordered him to stay in jail until 2029 - his original sentence.

An Israeli official told Reuters last week that Issawi had crossed into the West Bank as part of "continued involvement in attempting to establish terror cells."

Monday's deal dispenses with conspiracy charges and will see Issawi serve eight months for leaving Jerusalem - a decision Palestinian officials say will likely be endorsed by an Israeli military court on Tuesday.

Both Palestinian and Israeli officials have visited Issawi frequently in recent weeks to reach a compromise and pre-empt the violence his death could provoke.

The Palestinian Authority, based in Ramallah, has said it will try to prevent any mass uprising against Israel and has renounced violence in its quest for statehood.

Palestinian President Mahmoud Abbas is keen to give U.S. President Barack Obama a chance to renew stalled Israeli-Palestinian talks after his visit to the region last month.

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