For most of her life, 53-year-old Antonia de Freitas has lived in the sprawling Santa Marta slum beneath the gaze of the Christ the Redeemer statue. Drug gangs used to battle every night in the warren-like passageways, but much of the violence stopped when special police units arrived five years ago.

“Now you can go out and see nothing,” she said.

This was the dream of Rio’s “pacification” program: an end to gang-related shootouts and other crime in some of the poorest areas of the city. The program has installed 37 police units in the favelas, as the slums are known, and is credited with dramatically improving public safety.

But an outbreak of violence in the police-occupied favelas has left many Brazilians fearful that criminal factions could regain control, and it raises questions about the program’s long-term success.

“Rio was a violent place. There was almost a break for five years, and now it’s coming back with a vengeance,” said Theresa Williamson, executive director of Catalytic Communities, an organization that works with people living in Rio’s favelas.

Residents report an increase in shootouts at night in areas that had been stabilized. In the past two months, at least 10 gunfights have taken place near police bases in favelas that had been “pacified.” And earlier this month, tensions escalated after a 22-year-old officer was shot dead in Vila Cruzeiro, a drug gang stronghold in the North Zone of Rio.

In response to the killing, police carried out raids in 12 areas of the favela complex.

Over the weekend, riot police and special forces were deployed to the Rocinha favela, home to more than 70,000 people, when shootouts broke out between rival gangs. The gangsters also started a fire that closed the Zuzu Angel Tunnel, which runs through the community.

Jacky Caetano, who grew up in Rocinha and was there last weekend, said she had never heard so many shots.

“There were gangsters on every side,” she said. “It lasted throughout the early hours.”

Security forces deny that the program is in crisis. But as the country prepares to host the World Cup soccer tournament this summer and heads toward national elections later this year, security and violence threaten to dominate discussions.

A dangerous city

When the pacification program was launched in 2008, Rio was one of the most dangerous cities in the world. Most of the city’s 5,717 homicides that year took place in the favelas, where criminal gangs were often in control.

Part of the Manguinhos favela complex in the northern part of the city was nicknamed the “Gaza Strip” because of the violence. In 2009, drug lords shot down a police helicopter, killing two officers, during intense clashes, and children brandishing automatic guns were a common sight in many areas.

Setting up the program often led to more bloodshed as police carried out preparatory operations before occupying favelas and installing a Pacifying Police Unit, or UPP.

But five years later, the homicide rate has been cut in half, and police in the Santa Marta favela have not registered a single homicide since 2008.

Some of the most significant targets of the program were the larger favelas, including Rocinha and Complexo do Alemao. For many, the return of conflict to these communities has recalled a time when gangs — including the notorious Red Command, Friends of Friends and the Third Command — dominated the sprawling hillside slums.

Some community leaders say that the program was too ambitious for some of the larger favelas and that it was just a matter of time before the drug gangs fought to regain their turf.

“Complexo do Alemao was under the control of traffickers. They will not give up so easily. But we hope they give up controlling this territory with war weapons,” a security official said on the condition of anonymity because he was not authorized to speak publicly.

A missing bricklayer

Meanwhile, attacks and counterattacks between police and drug traffickers threaten to reduce popular support for the program.

In one case in July, a bricklayer named Amarildo de Souza disappeared from Rocinha, which sprawls over a hillside overlooking the wealthy beach neighborhood of Sao Conrado. Favela residents were outraged over allegations that the UPP tortured and killed de Souza, the father of six, while questioning him about drug trafficking. De Souza’s body has not been found.

At least 25 officers have been implicated in the case, including the unit’s then-commander, Maj. Edson Santos, who has been removed.

The officers denied any involvement, but residents said trust in the UPP had been broken.

“There is no confidence in the police, and the number of criminals has increased,” said Caetano, who moved away from Rocinha because of the violence.

In the months that followed de Souza’s disappearance, the pacifying police appeared to be in retreat after postponing plans to occupy Complexo da Mare, a favela dominated by drug gangs that is near the international airport. Mare had been the next target for program, which aimed to have 40 units in the city by the end of the year.

Instead, security authorities say they will deploy units to an area outside Rio where gangs linger after being pushed out of the city by increasing police presence.

“Gangs are going into new favelas. Favelas that were peaceful are now seeing it, and these are areas that are harder to control,” Williamson said. “When you don’t deal with these problems at source, makeup can’t really do much.”

But authorities say they will not give in.

“We never had the illusion that there would not be a reaction from the criminals who have dominated these communities for 30, 40 years,” said Col. Frederico Caldas, coordinator of the pacifying police. “But this reality has changed. The state has entered these communities and will not back down.”