A mural featuring Fidel Castro shaking hands with American author Ernest Hemingway, left, covers a parking lot wall in Havana. (Ramon Espinosa/AP)

El Romerillo is the kind of neighborhood one might think twice about entering in any other country than Cuba. Many of its houses are little more than shacks, and its narrow alleys call to mind the slums of so many Latin American cities.

But the socialist slums of Fidel Castro’s Cuba are a little different. There are no gangs or guns, and virtually no drugs. No one goes without health care or schooling or food. Many families leave their front doors open to the breeze, letting kids and neighbors come and go.

“You can walk around here at night with nothing to fear,” said Yosue Diaz, 34, who has lived in El Romerillo all his life.

Cubans have a special term for this sort of cradled existence: “tranquilidad social,” which means something like “social peace” but also law and order, a rare thing in a region with some of the highest crime rates in the world.

Fidel Castro’s death Nov. 25 at age 90 has forced Cubans to think about what kind of future they want for their island, and has left many outside the country wondering whether Castro’s crumbling economic model and authoritarian political system can carry on without him.

Enni Vasquez, 70, outside her home in the Vedado neighborhood in Havana. She says that she is very sad about Fidel Castro’s death and that she loved him a lot. "We will not see a man like him for many centuries. He lives on in our hearts," she says. (Lisette Poole/For The Washington Post)

Cuba’s next leaders must find a way to ease the country’s pent-up frustrations and eagerness for change, without completely unraveling Castro’s socialist safety net and risking unrest.

Perpetual economic austerity is unlikely to be a winning formula in the post-Castro era. El Romerillo is a place where Cubans are very poor, and very tired of it. “We’ve spent too many years doing the same thing,” Diaz grumbled. “We should be more like China.”

In the absence of direct elections, Castro and, for the past decade, his younger brother and successor, Raúl, have run Cuba with a kind of imposed social contract. Cubans lack basic freedoms, especially of the political sort, but as long as they do not challenge the government, they enjoy a degree of public safety and social security that is rare in Latin America.

Cubans’ life expectancy and literacy are on par with those of the world’s developed nations. The government guarantees a basic monthly food basket, including milk for children up to age 7 and extra protein for the sick and elderly.

“We’re poor, but we have a lot,” said Mercedes Caldoza, 53, who said she values living in a country “with no violence or terrorism” even though her house is falling apart.

The security blanket comes at a steep price. Cuban police — uniformed and plainclothes — are everywhere. The government has deputized block captains across the country to keep an eye on their neighbors and report suspicious activity, a system known as the Committees for the Defense of the Revolution. The system is an effective deterrent to crime, and political dissent, too.

Fidel Castro, the Cuban dictator who led the country's communist revolution in the late 1950s, died on Nov. 25. (Jason Aldag/The Washington Post)

The type of paternalistic system Castro built is at odds with liberal democracy, but it has an argument at its core: that the state is legitimate because it provides for its citizens and guarantees order. Maintaining that bargain is the minimum that Cuba’s future leaders will have to do to keep the system going. But it is likely to be impossible unless the country can adopt the kind of market reforms that have delivered growth in places such as China or Vietnam while preserving one-party rule.

“It’s never a good idea to give up freedom for security, because in the long run you get neither,” said Julio Cesar Guanche, a historian and legal scholar who argues that Cuba will need to develop a culture of “citizenship” to preserve the achievements of the socialist system.

“It’s better to find security in freedom: the ability to stand up for one’s rights, including economic rights and social rights,” he said.

Raúl Castro, 85, says he will step down from the presidency in 2018, and whether 56-year-old Vice President Miguel Díaz-Canel or another Communist Party official replaces him, the Castros’ successor will face an anxious society with expectations that are contradictory and maybe even impossible to meet.

There is a deep desire for more freedom and prosperity, but a lot of Cubans say they don’t want an upheaval that would turn the island into another violent, disorganized Latin American country. It is a message Cuba’s state-run media drives home relentlessly, with ample coverage of every mass shooting in the United States and crime and unrest in other nations. But when violent crime does happen in Cuba, you won’t read about it in the state-controlled media.

For now, the government’s formula works in places like El Romerillo, which was once a much rougher neighborhood. The first squatters who arrived were migrants from the countryside who set up shacks in an open field between a military base and an exclusive golf course in the years before Fidel Castro’s 1959 revolution.

The neighborhood grew more crowded in the late 1980s and early 1990s, when the collapse of Soviet support plunged Cuba into crisis and hungry families from eastern Cuba arrived looking for work.

Ana Rebe, 70, came three decades ago from Guantanamo, Cuba’s poorest province, and moved with her family into a tiny wooden shack. A single mother of three, she got a job as a cook nearby and over the years built a bigger, sturdier home.

Today, she scrapes by on a pension of $9 a month, selling cigarettes on the black market and getting help from her adult children. “All I have is the fridge and that TV,” she said, “but I live in peace.” There was a shrine to Saint Lazarus — a popular figure of devotion in Cuba — next to the television, which was tuned to wall-to-wall tributes to Fidel Castro.

Rebe said El Romerillo has improved over the years, as the government reduced crowding by finding homes for people and assigned social workers to attend to the neighborhood.

When Rebe’s son, Yoanis Londres, developed an immune disorder, he spent a year and a half in the hospital at no charge. “I thought he would die, but the doctors saved him,” Rebe said.

Yet even Cuba’s vaunted health-care system is cracking. Many hospitals are in woeful condition. Drugs and medical supplies are widely pilfered for resale on the black market. Patients know they can secure appointments quicker if they come with gifts such as sodas and candy.

These are the inevitable fissures in a system where more than 70 percent of Cubans work for the government but few earn a living wage.

Cuba’s prized education system has eroded, too. Many of its best teachers have taken jobs as tour guides, bartenders or hotel managers because those jobs pay exponentially more. In recent years, police have arrested teachers for accepting bribes to let students cheat on exams.

“You can’t survive on your salary. You just work and work and never get ahead,” said Londres, who works in a government auto-upholstery workshop but moonlights in the black market.

The limited economic reforms allowed by Raúl Castro have already produced sharp divisions that shock older Cubans. Top music acts performing at private parties charge entrances fees that far exceed a state worker’s monthly salary. A family in El Romerillo could eat for an entire month for the cost of a dinner in one of the city’s new upscale private restaurants.

Cuba’s “social peace” has mostly survived those emerging inequalities, but many quietly worry it will be lost if the country changes too fast.

“Economic liberalization has generated inequality and will continue to do so,” said Guanche, the Cuban legal scholar. “To fight it, the solution is getting more resources into the hands of more actors: unions and other organizations with their own power, or through policies that promote small entrepreneurs and a press that pays attention to rising inequality.

“Without it, there will be more liberalization, but a lot less social peace.”