The patio is cluttered with mattresses and suitcases, clothes spilling out of them. Sheets separate families from strangers, gentlemen from the ladies.

Women cook over an open fire fueled by freshly cut wood because the kitchen in this modest three-bedroom ranch home in the Costa Rican countryside cannot possibly accommodate food preparations for 50 hungry fugitives.

This is a secret safe house for Nicaraguan protesters who are trying to avoid capture by the country’s authorities. It was not designed for crowd comfort.

Even though the ranch is across an international border, those living here take turns on nightly guard duty, concerned about agents from Nicaragua infiltrating their haven.

The woman who runs the refuge, who goes by the pseudonym “the Godmother,” looked around while a compatriot slammed a machete against a tree stump to cut more firewood.

“We consider our stay here to be temporary,” she said. “We are tired already. We want to go home.”

The Godmother’s real name is Lisseth Valdivia. She used to own three clothing stores in Matagalpa, a city north of Nicaragua’s capital, Managua. A 39-year-old mother of two, she liked working out at the gym. She rode a new scooter. She was earning a decent living.

Then her life, and the lives of tens of thousands of other Nicaraguans, were upended in April, when first the elderly, and then the young, took to the streets to demand the removal of the president, Daniel Ortega, and his wife, Vice President Rosario Murillo.

Many Nicaraguans long viewed Mr. Ortega, in office since 2007, as increasingly dictatorial. But what finally drew masses of demonstrators to the streets were wildly unpopular social security cutbacks.

The police and pro-government mobs responded with deadly force, even against unarmed protesters, according to human-rights observers, shooting and killing people across the nation.

Ms. Valdivia said she wondered why nobody helped them. First one fell in her neighborhood, then a second. After the third was shot, she hopped on her new moped and came to their assistance herself.

Ms. Valdivia spent two months running what she considered a humanitarian command post, administering first aid and providing lunch to protesters who were snarling traffic with improvised road blocks. She learned how to use homemade mortars, she said, although she mostly left the weaponry to the men.

Then a relative phoned with a warning: “Don’t even think of coming here. There are about 25 police officers in your house, and they are destroying it.”

She fled and never looked back, leaving behind three shuttered businesses, a house, a car, the scooter — and, for his own safety, her 7-year-old son, put in the care of his father, who has sided with the government and sometimes sends Ms. Valdivia angry text messages about her allegiances.

“For now, I have to be with my people,” she said, referring to her fellow fugitives. “In the future, when Nicaragua is free, my son is going to enjoy all of that.”

Ms. Valdivia now lives with her teenage daughter and dozens of people she only recently met, including a radio announcer accused of setting fire to a government station, eight minors and several college students.

She is in charge of vetting newcomers to the ranch, turning away anyone who has been in jail, because she fears they could have been released on the condition they become informers.

In the protests’ early days, with hundreds of thousands of people in the streets, many observers thought Mr. Ortega — who had also led Nicaragua for most of the 1980s — would be forced from office. But the government’s brutal response, with hundreds killed, appearsto have only solidified his grip on power.

Still, those who fled try to remain optimistic.

“We did not surrender,” said Samuel A. Gutiérrez, 13, who arrived at the ranch in Costa Rica by bus and on foot after he fled Nicaragua with his parents. Samuel, who survived a government attack on a church that killed two people, is missing his freshman year of high school as he hides out at the ranch.

“We are all going back,” Samuel’s father, Orlando Gutiérrez, 50, said as a group of fugitives roasted marshmallows. “All of us.”

In the Nicaraguan government’s version of this story, the protesters are terrorists and murderers. Those students who paralyzed commerce when they broke off bricks from the streets and used them to build roadblocks at intersections across the country were armed and aligned with well-financed right-wing coup-plotters, including the Catholic Church.

Of the 322 people killed since the uprising began, 22 were police officers and about 50 were affiliated with the government’s leftist Sandinista Front party, according to a Nicaraguan human rights organization that the government has now banned. Protesters believe many of those people died from friendly fire, or in cynical attempts to cast blame on a citizenry that had been armed mostly with rocks and slingshots.

By the summer, the government regained the upper hand. In July, the Nicaraguan police, with assault rifles blazing, demolished more than 100 roadblocks. Friends turned out to be infiltrators, the police intelligence better than anyone imagined, and activists were arrested at their homes and underground hiding spots around the nation.

At least 565 people are still jailed, some of them on murder charges and others for what the government calls terrorism. Another 23,000 people, like the Godmother, retreated to neighboring Costa Rica.

Ms. Valdivia, hiding at first in Nicaragua’s mountains, escaped across the border in August after a surprise phone call. “I’m going to help you get out,” the voice on the other end said.

The caller was a Nicaraguan businessman, Jorge Estrada, who had fled to Costa Rica three years earlier after the government confiscated a housing development he was building.

Mr. Estrada now runs something of an underground railroad. He has arranged for the hasty departure of about 600 people, he said, and pays the rent for three safe houses including this one in Costa Rica.

The fugitives call him “Comando.”

“You know what happens when they are caught: torture and murder,” Mr. Estrada said. “How do you turn your back on something like that?”

On a December day, Mr. Estrada pulled up to the safe house with three giant trays of eggs. He said he spends about $200 a day on food alone. The former protesters go through 20 pounds of rice and 17 pounds of beans every day at this hide out, Ms. Valdivia said.

Everyone huddled around Mr. Estrada, eager for any news they had not already gleaned from Facebook and WhatsApp, where fake news about the crisis circulates.

President Trump had just signed the Nicaraguan Investment Conditionality Act, or NICA, which promises to squeeze Nicaragua with tough sanctions until the rule of law is restored.

“If all of this that the United States is doing, all this pressure, does not work for this man Ortega to react and leave, then one of the bloodiest wars Nicaragua has ever seen is coming,” Mr. Estrada said. That is, the war would come, if only the opposition had guns.

“There are no weapons,” Mr. Estrada lamented. “The United States are the only ones who can help us with that, and they still haven’t given the green light, so to speak.”

Like Mr. Estrada, Ms. Valdivia holds out a wistful hope that Mr. Trump will intervene, that the Republican leader will rescue Nicaragua from the socialist Mr. Ortega.