Bilal Diab and Thaer Halahla, members of the militant group Islamic Jihad, had gone without food for 78 days. Another six hunger strikers were reported to be in critical condition.
Had any of them died in prison, Israeli and Palestinian leaders feared a wave of violence across the occupied West Bank and probably revenge attacks on Israel as well.
Palestinian negotiators said the Israelis agreed to improve conditions for the 4,500 Palestinians behind bars. About 1,600 of the prisoners took part in the hunger strike.
The Israelis also agreed to free inmates held under "administrative detention" -- meaning they can be held virtually indefinitely for renewable 6-month periods -- once they finish their terms unless they are taken to court.
Under administrative detention, prisoners aren't charged, have no access to lawyers and don't appear in court. Some 300 prisoners are held under administrative detention.
Israel also agreed to allow visits by families in the Hamas-ruled Gaza Strip, which were stopped when Israeli soldier Gilad Shalit was kidnapped in June 2006, and release 19 prisoners from long terms of solitary confinement.
Cairo played a pivotal role in negotiating the Oct. 18 release of Shalit in exchange for 1,027 Palestinian prisoners.
Monday's deal, negotiated by prisoners' leaders and Israeli officials in Ashkelon prison south of Tel Aviv, was a major victory for the prisoners and underlined Israel's growing concerns about security in the West Bank and Palestinians' growing frustration with the fading prospect of ever achieving an independent state in the face of Israeli intransigence.
The political power of the 300,000 Jewish settlers in the West Bank, not to mention another 200,000 around Arab East Jerusalem as the government steadily drives Palestinians from the holy city that both sides claim as their capital, heightens Palestinian frustration.
The hunger strike sharpened tension in the occupied West Bank, where the plight of Palestinian prisoners is a highly emotive issue. Most families have someone behind bars.
Amid escalating protests in the West Bank to which the Israelis responded with tear gas, rubber bullets and water cannon, Middle East Quartet envoy Tony Blair urged the Israeli government to make a deal to end the hunger strike.
Blair, in an unusual intervention, said Prime Minister Binyamin Netanyahu's government should "take all necessary measures to prevent a tragic outcome that could have serious implications for stability and security conditions on the ground."
Palestinian President Mahmoud Abbas called the crisis "very dangerous" and said "if anyone dies … it would be a disaster and no one could control the situation."
Jamal Zahalka, an Arab member the Knesset, declared at a protest rally in the predominantly Arab town of Jaffa south of Tel Aviv, "If one of the striking prisoners dies, a third intifada will break out."
Palestinians staged uprisings against Israeli occupation in 1987-93 and 2000-03 in which thousands of people were killed and wounded.
Anti-Israeli anger among the 1.5 million Palestinians in the West Bank has been steadily mounting for months amid the Israelis' refusal, even under U.S. pressure, to contemplate freezing Jewish settlement activity as a first step toward ultimately relinquishing the West Bank.
Intimidation of Palestinians by settlers, including burning mosques and olive groves, has stoked the tension.
Government encouragement for new settlements and other moves, such as shutting down a Palestinian elementary school near the flash point city of Hebron to turn the area into a military training zone, have incensed the long-frustrated Palestinians.
The Palestinians waged large-scale hunger strikes in 2000, 2004 and in September-October 2011. Some 10,000 prisoners refused food in the 2004 strike.
The current fast began in December, when Khader Adnan, a member of the Islamic Jihad group, refused food to protest administrative detention.
He ended his strike Feb. 23, after Israeli authorities agreed to release him. Along the way, dozens of other Palestinian prisoners joined the hunger strike. But the protest became explosive April 17, when some 1,200 prisoners started refusing food. Hundreds more joined later.
Man behind Doritos Locos Tacos passed away on Thanksgiving
Britney Spears on kissing Ryan Gosling, Justin Timberlake in the Mickey Mouse Club