MEXICO CITY — Paramilitary forces backed by Nicaragua’s government killed two people early Saturday during a 12-hour siege on a Managua church where student protesters had sought refuge, a Catholic Church official said, in an episode that underlined the country’s escalating political unrest.

The assault came as the paramilitaries sought to retake the nearby campus of the National Autonomous University of Nicaragua, which students have occupied for more than two months during nationwide protests demanding democratic reforms and the resignation of President Daniel Ortega and his wife, Vice President Rosario Murillo.

About 100 students along with priests and journalists were holed up in the Church of Jesus of the Divine Mercy, enduring hours of gunfire until church mediators secured their release shortly after daybreak, said Cardinal Leopoldo José Brenes Solórzano, the archbishop of Managua, who confirmed the deaths.