JERUSALEM (CNN) -- All the Palestinians in Israeli custody who were on a hunger strike have agreed to resume eating following an agreement struck between Israeli and Palestinian authorities, Palestinian Minister of Detainees and ex-Detainees Issa Qaraqe said Tuesday.
Virtually all the approximately 1,600 prisoners taking part in the protest began their hunger strike April 17. But seven administrative detainees have been protesting for weeks -- two for 77 days, three for 71 days, and two for more than 60 days, Palestinian officials said.
Each of the seven will get a medical evaluation and will be put in front of a judicial review panel. If Israel has no security evidence against them, they will be released, the officials said.
News of the agreement triggered celebrations Monday in the streets of Gaza.
"I am glad it's over. I am glad nobody died," said Yigal Palmor, a spokesman for the Israeli Foreign Ministry.
The deal, brokered by Egypt, mandates that Israel move Palestinian prisoners in solitary confinement into other prison cells. Qaraqe said this will take effect within 72 hours of the deal being signed.
Israel also will allow families from the West Bank and Gaza to visit inmates. The Israeli Security Agency, in a statement listing details of the agreement, said that will apply to prisoners' immediate families.
Qaraqe added, during a press conference in Ramallah, that the agreement "talks about the humanitarian and social life in the prisons" and vows "to improve ... living conditions and respond to other demands."
The Israeli Security Agency statement said the Israel Prison Service committee "will discuss additional claims by the prisoners regarding the conditions under which they are being held."
A third element of the agreement cited by the Palestinians relates to whether Israel renews prison terms of Palestinians held on administrative detention. Those terms are generally six months, but Israel can renew them indefinitely.
The detention terms won't be extended if there is "no security information" -- in other words, no evidence that a person poses a security threat to Israel, Qaraqe said.
The statement from the Israeli Security Agency made no mention of such an offer.
It said the agreement states that Palestinian "security prisoners held in Israel ... will refrain from all activity that constitutes practical support for terrorism, including recruiting people for terrorist activity, guidance, financing, coordinating among recruits, aiding recruits, etc."
The agreement covers all security prisoners and "will also be binding on future prisoners," the Israeli statement said.
Palestinian officials did not immediately confirm this part of the agreement.
More than 4,500 Palestinian prisoners are in Israeli prisons for a variety of offenses, ranging from rock-throwing to murder. Of these, about 300 are in administrative detention, according to rights groups.
Palestinian Authority President Mahmoud Abbas had discussed the prisoners' issues with Israeli officials and world leaders, including members of the Middle East Quartet -- the United Nations, the United States, the European Union and Russia.
Israeli government spokesman Mark Regev said Israel agreed to the deal at Abbas' request.
"It is our hope that this decision will serve to build confidence between the parties and further peace," Regev said.
The deal with Israeli prison authorities was reached in a meeting at Ashkelon prison, the head of the Palestinian Prisoner Association Club, Qadoura Fares, said in a statement
Hanan Ashrawi, a veteran Palestinian lawmaker, called it a victory for all Palestinians, including those "in exile."
"The hunger strikers' courage is magnificently inspiring, and their selflessness deeply humbling," Ashrawi said. "They have truly demonstrated that nonviolent resistance is an essential tool in our struggle for freedom."
Qaraqe, the Palestinian detainees minister, offered "a great salute to all our prisoners who have conducted this battle with great pride, to face this unjust oppressor and (to fight) for the dignity and pride of human rights."