RIO DE JANEIRO • High on a hill in South America's largest slum, Ms Samantha Almeida was startled by the latest volley of gunfire. It was close. Too close. She knew she had to get her girls moving.
The shoot-out had woken them an hour before.
Killings in Rocinha, once the showcase shanty town in Brazil's showcase city, had quadrupled in less than a year. In recent weeks, the town had taken on the feel of a war zone as drug traffickers battled with police.
Suddenly, the bullets were buzzing just above the roof.
The family members had started sleeping in one room because they felt safer together, and Ms Almeida, 33, had drilled her girls on an escape plan - when she gave the sign, they would move fast, keeping low, to a windowless, bunker-like terrace.
Another shot rang out, and Ms Almeida rose, telling the girls to follow, she later recalled. Eight-year-old Natasha moved quickly, but Nicolly, her painfully shy 16-year-old, was still struggling to her feet when they heard the window crack. And then blood was seeping through Nicolly's pink tank top. "Mama," the girl said before slumping. "I've been shot."
Rocinha, Rio's largest favela - or hillside shanty town - was once a symbol of rising fortunes in a nation that finally seemed on the fast track to greatness. Its hive-like streets were even portrayed in the animated Hollywood movie Rio. But a little more than a year after hosting the Olympic Games, that optimism is disappearing in a wave of urban violence.
Across Rio, at least 120 police officers were killed last year. Through December, 6,590 people were slain - the highest rate in nearly a decade. Crippled by corruption scandals and economic woes, the "Marvellous City" is floundering.
The mayhem in the favela of nearly 200,000 reflects a national plague - Brazil suffered a record 61,000 violent deaths in 2016.
Nicolly was unconscious when her stepfather carried her into a hospital. Medical personnel quickly determined she had a bullet lodged just above her left shoulder blade and wheeled her into surgery. As her stunned mother waited, one gunshot patient after another was rushed in. Fortunately, Nicolly survived.
The outbreak of violence in Rocinha was ostensibly triggered by the execution of three top traffickers by rivals last August. But the bigger culprit, observers say, is the erosion of the state in a nation whipsawed by economic crisis and corruption.
Brazil puts the B in the Brics, an elite club of economies including Russia, India and China once seen as emerging powerhouses.
But Latin America's largest country has been weakened by political and economic crises, and its fragility is extending to places such as Rocinha.
A financial scandal cost then President Dilma Rousseff her job in 2016. Her replacement, Mr Michel Temer, has spent the past year fighting graft allegations.
In the Rio state, former governor Sergio Cabral was sentenced last June to 14 years in prison for his part in the massive corruption and bribery scandal known as Lava Jato, or "Car Wash". The authorities say he got over 224 million reais (S$92 million) related to construction projects, including one involving the government-controlled oil giant Petrobras.
The broader Car Wash scandal has rocked Petrobras, causing it to lose billions of dollars and slash spending, and in turn, the turmoil has ravaged the budget of Rio, which relies heavily on royalties from Petrobras.
The financial squeeze has made Rio police officers - notorious for bribe-taking - even more susceptible to temptation. Last May, evidence surfaced that officers in northern Rio had "rented" an armoured vehicle to drug traffickers for the equivalent of roughly US$300,000 (S$398,000).
In Rocinha, gang warfare became so bad that the state called in the army for a week last September. Since then, heavily armed special police forces have patrolled the favela. With no single group solidly in command, and the police struggling to regain control, a crime wave has broken out.
Homes are being burgled, businesses robbed. Residents of the favela are distraught.
"You watch the battles in the Middle East on TV. Here, it's worse," said Mr Marcos Alfredo Guedes de Oliveira, whose butcher shop was robbed at gunpoint recently for the first time in its 20-year history.
"Rocinha is at war."