Not long ago, a sudden boom echoed across the rooftops of southern Rio de Janeiro, bouncing off the granite hills and jolting people out of their slumbers in the wee small hours.
It came from a relatively tranquil neighborhood, and it was loud enough to be heard more than a mile away, within the villas beside Sugarloaf Mountain and along Copacabana Beach on the shores of the Atlantic.
Rio's residents are well accustomed to being woken in the night by volleys of fireworks, the thumping party music, and — in parts of the city — bursts of gunfire. But this loud bang was different: an explosion.
"It was massive," says Andre de Souza, 49, a resident of Botafogo, the neighborhood where the blast happened last month. "Afterwards I heard gunshots, and I realized that something very strange was going on."
The commotion was caused by a gang of robbers, who broke into a local branch of a major bank and detonated the cash machines, leaving a trail of wreckage and making off with an untold amount of cash.
A wave of these attacks is adding another complication to Rio's chronic security crisis, spreading fear among the public and dealing a blow to property prices for residents with homes near banks.
The crisis is so bad that Brazil's President Michel Temer this month signed a decree transferring responsibility for security in Rio from state authorities to the nation's armed forces, under an army general. Brazil has deployed troops on Rio's streets to work alongside police before — including during the 2016 Olympics. But this is the first time the military has taken overall charge of security operations in the state since the end of the country's dictatorship in 1985.
The Botafogo explosion was particularly worrying for de Souza, because it occurred inside the tall, modern building in which he lives, along with his wife and their two dogs. The bank, a branch of Santander, is on the ground level. Their apartment is six floors above it.
De Souza's wife, Dilza Roxo, an accountant, says the bank robbers arrived in Botafogo in several cars at around 2:30 a.m. and blocked the surrounding roads. "There were around 20 men, in masks and with rifles, asking people to lie down, or to leave their balconies and go inside," she says.
"The porter called the police, but they didn't come, thank God!"
Roxo believes the police lack training and weaponry. Had they confronted the gang, she says, there would likely have been a shootout in which innocent bystanders could have been killed. She says the police finally showed up, about 10 minutes after the gang had left with the stolen cash.
Afterward, her husband de Souza went downstairs to inspect the damage. "I came down and saw the corridors full of smoke. I thought the building's hallway had collapsed," he says.
The building, with 96 apartments, turned out to be intact. Yet the incident has badly shaken the couple.
"It is really concerning," says de Souza, a physical education teacher. "We don't know if [the bank robbers] will come back. So it is intensely worrying for people like us, living above these banks."
The couple wants to move out, although they acknowledge how hard it may be to find a buyer.
"It's become impossible to live here," says Roxo. "Personally, I'm afraid. And it's not just me. I talk to many people. They're afraid too."
Rio's Civil Police said it could not comment on this and other robberies while they are investigating the cases.
The police did, however, claim one significant breakthrough: On Monday, they announced the arrest of six people involved in one of the country's biggest gangs of bank robbers. The suspects are allegedly part of a criminal organization in southern Brazil, with links to organized crime in Rio.
There was an average of five attacks a month targeting ATMs inside banks in and around the city last year, according to the Public Security Institute, a Rio state government research group. That's a rise of one-third from 2016. So far this year, the numbers are trending even higher.
These attacks extend far beyond Rio de Janeiro. According to local news reports, 10 bank branches around Brazil were hit within the last week, of which only one was in the Rio metropolitan area. Explosives were used in all except one case. During one night, last Wednesday, robbers blew up cash machines in four of the six banks in Caconde, a town of 19,000 people in São Paulo state.
These robberies are widely blamed on criminal organizations in the narcotics trade that are seeking additional sources of relatively easy income. They have no shortage of weapons, according to Vinicius Cavalcante, a Rio-based security consultant who spent many years working with Brazil's police and intelligence agencies.
Cavalcante says there is "an absurd quantity" of military equipment in criminal hands, including high-powered rifles and submachine guns. He says these groups possess large quantities of dynamite and TNT, used in mining, which is stolen from quarries in Brazil or smuggled in from neighboring Bolivia and Paraguay.
"The criminals have found out that blowing up ATMs is very profitable, and carries very little risk," says Cavalcante. "That's why they have been doing it around Brazil."
The bank robbers often lack expertise in handling explosives, he says. They sometimes use far larger amounts than is necessary, blowing out windows, damaging neighboring buildings and sending shrapnel flying across a wide area.
"This worries people, and fuels a general sense of insecurity and terror," Cavalcante says.
The banks have responded in recent years by investing heavily in extra security measures — including closed-circuit TV cameras, security doors, alarms and armed guards — and by seeking to increase the number of digital transactions to reduce the need for cash.
The Brazilian Federation of Banks says that in the 15 years to 2016, bank robberies and attempted robberies in the country declined significantly, although official statistics show bank heists spiked last year in Rio. It describes the cash machine bombings as a source of "extreme concern."
Concern is also felt in Rio's northern neighborhood of Penha Circular, an unglamorous part of town where Bruno dos Santos, 35, runs a company providing security to local shops.
The area is close by several low-income areas, known as favelas, where deadly war has erupted between rival drug gangs, causing "shooting, night and day," he says. While millions danced and paraded through the streets during Rio's recent Carnival, the neighborhood street party — that dos Santos usually organizes — was canceled because of security worries.
Dos Santos says these days he thinks twice before walking into a bank. "I get nervous. I look around, to see who's nearby, who's approaching, what car is passing by."
As for living near, or above, "I'd never, ever do that," he says. "That's asking to die."
Such fears are impacting property prices. Antonio Carlos Tibirica, a realtor in the area, says the cost of apartments located above banks have "tended to fall more and more." He cites a condo once valued at $125,000 that is now on sale for $80,000 — without yet attracting a buyer.
The neighborhood's main street has five bank branches, all within a few hundred yards of each other. Sonia Regina, a retired book designer, and her family live above one of them. They are also worried.
Several months ago, a gang blew up cash machines in a Santander branch close to their apartment, with a "really big and frightening" 3 a.m. explosion. A fire was set in another nearby bank, and a third — a 10-minute walk away — was blown up two weeks ago.
Regina, 55, faces a dilemma that powerfully illustrates the crisis with which the people of Rio are now grappling: She actually likes living close to banks, because, she says, it reduces the risk of being robbed while carrying cash home.
Yet she doesn't want to be so close to one that she and her family will be blown out of their beds.
Copyright 2018 NPR. To see more, visit http://www.npr.org/.