MANAGUA, Nicaragua — A siege of Nicaragua’s most important Catholic church ended on Tuesday as seven mothers holding a hunger strike inside the Managua cathedral left, saying they feared they would be assaulted by pro-government demonstrators.

The mothers had launched their hunger strike a day earlier to demand the release of their imprisoned children, whom they consider political prisoners. The women also wanted to show solidarity with a similar action that had begun days earlier at a provincial church.

The two hunger strikes provoked the biggest showdown between Nicaragua’s authoritarian government and the powerful church in months. A pro-government mob burst into the cathedral on Monday, scuffled with a priest and nun, broke into locked rooms and committed “acts of desecration,” the Archdiocese of Managua said. The hunger strikers fled to another part of the building, where they sheltered overnight, according to one of them, Jeaneth Chavarría.

Police ringed churches in Managua and other parts of this predominantly Catholic country to keep anti-government demonstrations from spreading. But they ended their blockade of the soaring, modernistic cathedral Tuesday afternoon after the mothers departed.

“We had to evacuate for reasons of security,” Dulce Briceño, one of the mothers, said in a video on social media. “We couldn’t continue staying there.”

The women left in a Red Cross ambulance, as part of a deal negotiated by the papal nuncio in Managua, according to a senior Catholic official who spoke on the condition of anonymity to discuss the politically sensitive matter.

The Catholic Church is perhaps the strongest independent institution remaining in the Central American country, which has been ruled by President Daniel Ortega and his Sandinista Party since 2006. His government has grown more authoritarian over the years — and cracked down harshly when nationwide protests erupted in April 2018 calling for his resignation.

At least 325 people were killed in those demonstrations, according to international human rights groups. Authorities subsequently banned protests.

The few that still occur generally pop up at churches or Catholic universities. Dozens of students demonstrated Tuesday at the Jesuit-affiliated University of Central America chanting: “Respect the church!”

Nicaragua’s human rights record has been repeatedly criticized by the Trump administration, which has targeted several officials with sanctions.

After Nicaragua’s bishops conference expressed “profound worry” about the siege of the churches, Vice President Rosario Murillo criticized “those who claim to speak in the name of the faith.” She called them “repugnant wolves who spread hatred.”

Opposition activists estimate there are as many as 150 political prisoners in Nicaragua. The government denies holding prisoners of conscience. Last spring, it released more than 600 people detained in connection with the 2018 anti-government protests.

The upheaval began on Thursday when nine women declared a hunger strike in the San Miguel Arcángel church in Masaya to seek the release of their jailed relatives. The church is led by the Rev. Edwin Román, a prominent critic of the government.

Chavarría’s son was arrested in January after taking part in anti-government protests. Julián Narváez Chavarría, 23, is being held on robbery charges. His family says the charges are bogus and he’s being punished for his activism.

The authorities quickly cut off electricity and water to the church compound, and arrested 13 activists who had brought water to the hunger strikers. On Monday, those activists were charged with possessing weapons including handguns, a shotgun and gas bombs.

Civic leaders dismissed those charges as false.

“The dictatorship is clearly imposing draconian sanctions to make sure that nobody crosses the line — not even the mothers of political prisoners who tried something so peaceful” to win their children’s release, said José Miguel Vivanco, Latin America director at Human Rights Watch.

Román said early Tuesday that the situation at his church was desperate. Police were outside the door, he said, along with relatives of the hunger strikers who had been intimidated into joining them.

“We are urgently denouncing that they want to break down the door. This is an SOS,” the priest said by phone. But the authorities didn’t breach the church entrance.

The United Nations’ human rights office and countries including Spain and Costa Rica have protested the treatment of the hunger strikers and the priest.

Chavarría said the mothers had taken the drastic step of refusing food to pressure the government to release their children before Christmas.

“They didn’t commit any crime,” she said by telephone from the Managua cathedral on Monday evening.

Ortega first came to power as a leader of the leftist Sandinista revolution that toppled a right-wing dictatorship in 1979. He lost reelection in 1990 but came back to power after improving his relations with the Catholic Church and business community. Those ties have become strained in recent years.

Sheridan reported from Mexico City.