Palestinian prisoners on hunger strike agreed with Israel on Monday to end their fast in return for improved conditions, officials on both sides said.
"All of the factions signed an agreement to end the strike," Qadura Fares, head of the Palestinian Prisoners Club, told AFP after several hours of negotiations between prison officials and senior detainees at Ashkelon jail.
Israel Prisons Service spokeswoman Sivan Weizman confirmed an agreement had been reached.
Palestinian lawyer Jawad Bulus, who represents several of the hunger-strikers, said he visited hardcore strikers Bilal Diab and Thaer Halahla, who have been fasting for 76 days, and informed them of the decision.
The pair, both members of Islamic Jihad, also decided to end their fast, their supporters announced later.
Most of the 1,550 prisoners had stopped eating for up to four weeks to demand better conditions, while another six prisoners had been refusing food for between 53 and 76 days in protest at being held in administrative detention.
The procedure allows suspects to be held without charge for renewable periods of up to six months.
Israel's Shin Bet internal security agency said prisoners' leaders had signed a commitment to "totally cease terror activity" from inside the prisons, while Israel agreed to return those in solitary confinement to the general population and permit family visits from both the Gaza Strip and West Bank.
Palestinian prisoner affairs minister Issa Qaraqaa told reporters in Ramallah that the transfer of those in isolation cells would take place in 72 hours from the time the deal was signed and the Gaza family visits, stopped seven years ago, would resume in a month.
A Shin Bet spokeswoman said that prisoners held without charge would be freed at the end of their current period of detention -- unless fresh evidence emerged against them.
"All administrative detainees are ending their hunger strike," she told AFP. "All administrative detainees will be released at the end of their current detention periods, unless further evidence will be presented on their cases."
Former British prime minister Tony Blair, now Middle East special envoy for the international Quartet -- the EU, US, UN and Russia -- welcomed the deal, after expressing increasing concern on Sunday for the deteriorating health of the hunger strikers.
The deal was reached after talks mediated by Egypt and the Palestinian Authority and made possible by the agreement of Palestinian groups "outside the prisons," a statement from the agency said.
Signup to our newsletter and follow us on Facebook and Twitter!
The pledge to "refrain from any act that would support terror" applied to all prisoners, both present and future, it said.
Should any of the prisoners renege on the deal, or begin another hunger strike while in jail, Israel would "cancel its commitment regarding solitary confinement and family visits," it said.
Hanan Ashrawi, a senior member of the Palestine Liberation Organisation, said that the agreement "proves the power of non-violent resistance against Israel's illegal occupation of Palestine."
Mark Regev, spokesman for Israeli Prime Minister Benjamin Netanyahu, said the deal was agreed at the request of Palestinian president Mahmud Abbas.
"It is our hope that this gesture will serve to build confidence between the parties, and further peace," Regev added.
In a separate but related development, Israel also agreed to hand over to the Palestinian Authority the remains of 100 militants killed in anti-Israeli attacks.
"As a gesture to president Abbas, Israel will return to the Palestinian Authority bodies of 100 terrorists who were killed by perpetrating attacks," Ofir Gendelman, another Netanyahu spokesman, said on his Twitter account.
News of the deal to end the strike was confirmed by Gaza's Hamas rulers.
Hamas hailed a "victory for human dignity," which was welcomed in the Gaza Strip by tens of thousands of supporter
The hunger strike has garnered widespread support among Palestinians, with hundreds turning out daily to join marches and sit-in protests.
Although prisoners have staged hunger strikes in the past, the practice of refusing food has becoming an increasingly popular form of protest since a landmark protest by a prisoner who went 66 days without eating over his being held without charge.
Khader Adnan only agreed to end his strike after reaching a deal with Israel ensuring he would be released at the end of his four-month term, putting the international spotlight on the issue of administrative detention.
There are 4,699 Palestinians being held in Israeli jails, of whom 319 are in administrative detention, according to Prisoners Club figures.