MASAYA, Nicaragua — Diana Lacayo never imagined that a hunger strike held in a church would turn into a nine-day siege, with the police outside and the electricity and water cut off inside.

But to the Nicaraguan authorities, even this modest protest was a challenge to be crushed.

For nearly two years, Nicaraguans have been rising up against the grip of one family, the Ortegas, who are accused of turning the country into a personal fief: The president has no term limits, the first lady is the vice president and their children hold top posts in industries like gas and television.

In the face of unrest, the government has used uncompromising measures to silence public dissent. And despite a collapsing economy, American sanctions and mass emigration, President Daniel Ortega and his wife, Vice President Rosario Murillo, still hold power firmly.

Once seen as a national hero for his leadership of the leftist Sandinista Front that overthrew the dictatorship of Anastasio Somoza in the 1970s, now Mr. Ortega is seen by many in this generation of Nicaraguans as an autocratic ruler himself.