Students walk out of besieged church on Saturday after being trapped inside by gunfire for more than 16 hours.

More than 200 university students were freed from a besieged church in Nicaragua after a night of attacks during which two students were killed and dozens more wounded.

The students walked out on Saturday after Catholic Church leaders negotiated their release with pro-government gunmen.

They had taken refuge at the Jesus of Divine Mercy church in the capital Managua after police drove them out of the National Autonomous University of Nicaragua (UNAN), where students had barricaded themselves for two months in protest against President Daniel Ortega.

Pro-government groups kept the students trapped inside with gunfire for more than 16 hours.

Twenty-year-old construction student Gerald Vazquez died inside the church after he was reportedly shot in the head.

The second person who died has not yet been identified, Nicaraguan media reported, with preliminary reports saying the youth died behind the university barricades.

Police have not issued a statement yet.

Official government website El 19 said the university had been occupied by "thieves" and "terrorists".

Increased pressure

Around 270 people - the vast majority of them civilians - have been killed in the political unrest that took hold of Nicaragua in April.

On Wednesday, the Inter-American Commission on Human Rights said the death toll stood at 264.

At least nine have died since protesters increased pressure on the government on Thursday with further mass demonstrations and a national strike.

Protesters are demanding the resignation of President Ortega and his wife Vice President Rosario Murillo, who they accuse of establishing a dictatorship characterised by nepotism and brutal repression.

Rights groups have accused security forces and groups loyal to the government of using "lethal force" to crack down on the protests.

Last week, Ortega rejected calls for his resignation, telling thousands of supporters that protesters demanding he leave office should "seek the vote of the people" if they want to govern.

Among them was Waleska Sandoval, who said "forgive me, mama, I love you," in a tearful plea for her life.

"We fought back with stones and mortars, but they shot at us with high calibre weapons: AK-47s and I don't know what else," Sandoval told reporters after she emerged from the church on Saturday.

"The priest had to come out with a white flag to ask for the ceasefire."

Cardinal Leopoldo Brenes negotiated safe passage for the students with the president's office and confirmed two students had been killed.

"We have said many times, not one more death," he said. "These two deaths hurt."

Rain of bullets

Before their release, a freelance reporter trapped inside the church with the students tweeted "For breakfast, they give us a rain of bullets. Endless bursts of bullets from the park at the church continue."

Another reporter posted a video of a student who had been shot in the leg but could not leave the church for hours with police reportedly blocking ambulances from taking out the wounded.

“The pain is unbearable” says this medical student who was shot through the leg today and left on the ground for hours in the church because police wouldn’t let ambulances in to carry out wounded. pic.twitter.com/aSJLzKEg8c