AMMAN (Reuters) - A tentative deal has been reached to end a strike in a Syrian prison by nearly 800 mostly political detainees that would eventually lead to the pardon and release of those held without charges, rights groups and activists in touch with inmates said on Monday.

A still image taken from a video uploaded on a social media website shows what it says are government security forces walking outside Hama prison, Syria, May 7, 2016 after a revolt by its inmates. Social Media Website/Handout via Reuters TV

They said the deal brokered late on Sunday would end a mutiny in the Hama prison in central Syria that started last week when political detainees revolted after five inmates were to be taken to the notorious Sadnaya prison for the execution of death sentences passed by an extra-judicial military tribunal.

“The regime has agreed to most of our demands to release those political detainees held without charges,” said a rights activist in touch with two inmates who requested anonymity.

The prisoners seized the prison 210 km (130 miles) from Damascus, and took hostages from guards..

That prompted a siege in which the authorities tried to storm the civilian prison on Friday using tear gas bombs and rubber bullets in an attempt to end the rebellion.

Leading Syrian rights activist Mazen Darwish, a former detainee in the prison and in touch with the prisoners, said a verbal agreement had been reached, but did not give details.

Another rights activist in touch with inmates said the deal was brokered after tribal figures intervened with the authorities who gave assurances to inmates held without charge they would be released if they ended their revolt.

The Syrian interior ministry has denied the reports about Hama central prison but has not elaborated on the issue since Monday.

The UK Observatory for Human Rights had confirmed a deal was in the works to release 26 detainees. The authorities previously released 46 detainees under Red Crescent mediation until negotiations broke down.

The deal comes after conditions worsened and inmates made appeals to the International Committee of the Red Cross (ICRC) after prison officials cut electricity and water amid food shortages and serious medical conditions among some of the inmates.

Inmates have demanded the release of political detainees held without charges. Many feared a wave of executions that could follow if they were to be transferred to the Sadnaya military prison, north of Damascus.

The prison itself was the scene of protests in 2008 by Islamist detainees that led to several being fired at and killed.

International rights groups say thousands of detainees are held in Syrian government prisons without charge and many of them are tortured to death, which authorities deny.

Human Rights Watch expressed concern late on Friday about the safety of the hostages and said an attempt to retake the facility risked high casualties.

The Syrian conflict began in 2011 with popular protests against President Bashar al-Assad and spiraled into civil war after a crackdown by security forces.