JERUSALEM (CNN) -- A group representing Palestinian prisoners reached a deal Monday with Israel to end a hunger strike.
Palestinian officials said the deal, brokered by Egypt, includes a series of steps that Israel will take to ease prison conditions.
In a statement, Israel said the Palestinian representatives also agreed the prisoners will halt terrorist activity inside prisons.
Up to 2,000 Palestinian prisoners have been taking part in a hunger strike. The vast majority began April 17.
"I am glad it's over. I am glad nobody died," said Yigal Palmor, spokesman for the Israeli Foreign Ministry.
The deal includes Israel moving any Palestinian prisoners in solitary confinement into other prison cells.
Israel will also 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 immediate family.
Ziad Abu Ein, the Palestinian deputy minister of detainees and ex-detainees, said there was a third element to the agreement that still needed to be finalized. It involved Israel no longer renewing prison terms of Palestinians who are currently held on administrative detention. Those terms are generally six months, but Israel can renew them indefinitely.
The Israeli Security Agency made no mention of such an offer. It said the Israel Prison Service committee "will discuss additional claims by the prisoners regarding the conditions under which they are being held."
For their part, Palestinian officials representing the "security prisoners held in Israel" agreed the prisoners "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 statement said.
Palestinian officials did not immediately confirm their part of the agreement.
The head of the Palestinian Prisoner Association Club, Qadoura Fares, issued a statement saying the agreement was reached with Israeli prison authorities during a meeting at Ashkelon prison.
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.