A mass hunger strike staged by Palestinian prisoners over conditions in Israeli jails was suspended on Saturday after a deal with Israel, officials said.

About 1,500 inmates launched the actionon April 17, in one of the largest such strikes.

What's behind Palestinian prisoners' hunger strike? – Inside Story

The 40-day hunger strike raised tensions with Israel as protests in support of the strikers spilled over into clashes in the occupied West Bank and along the Israel-Gaza border.

More than 800 prisoners, who had stuck with the hunger strike until Saturday, ended it after talks held with the International Committee for the Red Cross (ICRC) and the Palestinian Authority concluded in an agreement with Israel, allowing prisoners to receive two visitors per month.

Issa Karaka, Chairman of Prisoners' Affairs at the Palestine Liberation Organisation (PLO), confirmed the inmates had agreed to stop the strike.

WATCH: What's behind Palestinian prisoners' hunger strike?

On Wednesday, the UN High Commissioner for Human Rights Zeid Ra'ad al-Hussein urged Israel to improve conditions for Palestinians in its custody.

Both Karaka and the Israeli Prisons Service did not initially divulge the full details of the agreement. However, the Prison Service did say that a second monthly family visit would be reinstated after it had been cut in the past.

"After intense negotiations, a compromise was reached on the just demands of the prisoners and based on the agreement, the details of which will be disclosed later, the strike has ended," Jamal Mheysen, a member of the central committee of Palestinian President Mahmoud Abbas's Fatah movement, said in Ramallah.

"Today, we declare the victory of the prisoners and the Palestinian people. We declare the triumph of the prisoners in their epic struggle and fight for freedom and dignity," he added.

The strike was called by Fatah leader Marwan Barghouti, the most high-profile Palestinian jailed in Israel, to protest against solitary confinement and an Israeli practice of detention without trial that has been applied to thousands of prisoners since the 1980s.

Other demands included longer and more regular family visits, landlines installed in prisons and better healthcare.

There are currently 6,500 Palestinian political prisoners held by Israel, including more than 500 administrative detainees, according to Jerusalem-based prisoner rights group Addameer.

READ MORE: How my father survived a hunger strike in Israel

Speaking to Al Jazeera from Ramallah, Majed Bamya, who oversees the prisoner files for the Palestinian foreign ministry, said the outcome of the hunger strike was a success. 

"This was one of the widest and longest Palestinian hunger strikes in history of the prisoners' movement and it was for basic demands.

"Israeli reaction was that there will not be a dialogue, nothing will be given. They tried to break the hunger strike by force and utterly failed. The hunger strikers remained steadfast, dialogue was established and the demands were met.

"We will have the details in the coming hours."

The Free Marwan Barghouti campaign said in statement that "the Palestinian prisoners on hunger strike prevailed".

"This is an important step towards full respect of the rights of Palestinian prisoners under international law. It is also an indication of the reality of the Israeli occupation, which has left no option to Palestinian prisoners but to starve themselves to achieve basic rights they are entitled to under international law," the statement added.

Barghouti was convicted for his involvement in the second Palestinian intifada, and sentenced in 2004 to five life terms.

Surveys show many Palestinians want him to be their next president.

Source: Al Jazeera News