More than 200 Nicaraguan university students have been reunited with their parents after a tense night of armed attacks that left two people dead and dozens injured.

The students had sought refuge in a local church after police forced them out of the National Autonomous University of Nicaragua, which had been occupied during two months of protests against the government of president Daniel Ortega.

“It was a really hard night. They discharged their entire heavy arsenal against stones and mortars,” said one young man who declined to give his name out of fear.

“They wanted to kill us all.”

Father Raul Zamora said the students came under fire at the Jesus of Divine Mercy church for more than 12 hours.

Nicaragua Church
Relatives wait for the arrival of students caught up in the violence (Alfredo Zuniga/AP)

He said two journalists exited the church safely earlier on Saturday, along with some injured students who needed urgent hospital care.

The police onslaught was televised by local media and covered by three local journalists who reported via Facebook Live.

Students fearing for their lives sent farewell messages to friends and family.

“I did it for the country and I don’t regret it,” a crying girl said in a video that went viral.

“Forgive me mama, I love you.”

The police have not issued official statements.

Nicaragua Church
Students are reunited with family after the end of the siege (Alfredo Zuniga/AP)

Two students were killed, Roman Catholic cardinal Leopoldo Brenes said.

On Saturday morning, Cardinal Brenes negotiated with the president’s office for the safe transfer of students out of the church and to the Metropolitan cathedral, where representatives from the Inter-American Commission on Human Rights were on hand.

“We have said not one more death, and this keeps happening,” Cardinal Brenes said. “These two deaths hurt.”

Tensions in Nicaragua erupted this spring after the government announced cuts to social security.

The changes were quickly reversed, but students took to the streets and occupied the main university with a wider call for Mr Ortega to step down.

The crisis in Nicaragua has left around 270 dead and more than 2,000 injured as forces loyal to the government crack down on opponents.