First came troops with assault rifles and flak jackets, then street cleaners with brooms and buckets of whitewash, and finally satellite TV salesmen with a three-month special offer to first-time subscribers.
Rio de Janeiro's 35th favela pacification operation, which aimed to clear drug gangs from 12 shanty towns in the Lins favela complex, was over within hours on Sunday morning without a shot being fired.
But the commercial barrage has only just begun for the latest communities – all within three miles (5km) of the Maracanã World Cup final stadium – to be brought closer into the fold of government authority and global consumer culture.
Following a series of scandals relating to excessive use of force by the police, the latest battle was as much for hearts and minds as the city streets.

The paramilitary operation began when armoured personnel carriers roared through the suburban streets just after dawn while curious residents took smartphone pictures from their balconies and delivery men dropped off bundles of Sunday morning papers. Hundreds of heavily armed troops and paramilitary police then moved into the hillside favelas, sweeping the steep, narrow pathways. They are likely to stay for two weeks, after which a more lightly armed resident force known as the UPP will set up a base in the area.
While the morning's operation passed without incident, this pacification was not without casualties. One officer was killed and two injured in a gunfight during the "softening up" preparations the previous week. However, the police spokesman Claudio Costa said he was satisfied with the way things had gone.
"It's a success," he said. "It was quiet today. This operation today will improve the confidence in the UPP."
Following the military operation, the authorities moved immediately to demonstrate the benefits that come with a return to the bosom of the state. A team of street cleaners swept the roadsides and picked some of the rubbish from the filthy stream below. The Rio state governor, Sergio Cabral, said the authorities would spend £140m to improve living conditions.

Next followed a switch of symbols. Red Command graffiti was whitewashed over and the Policia Militar insignia – a dagger through a skull – was draped over the walls. A brief propaganda display followed: local children were invited to ride on police horses, a PR team displayed the bags of cocaine, cellophane-wrapped blocks of hash and the gun clips they said had been found in the search operations, and a mobile sound van repeatedly broadcast an appeal for support: "People of Rio de Janeiro. As part of the ongoing pacification of our city, your community is being occupied. We rely on your co-operation to maintain stability. The new era begins now."
The change of power was marked with a ceremony in which marines and police presented arms as the flags of Brazil and Rio state were raised to mark the recovery of the territory by the authorities.
"I don't know if this will be an improvement yet," said a local resident, Diane de la Rosa, looking out across an open sewer at the flag-raising ceremony. "But I hope so. We all hope so."
There have long been questions about the pacification programme and whether it is merely a cosmetic exercise aimed at improving the city's image before the World Cup and Olympics. The authorities, however, insist it represents a long-term shift in priorities.
The results so far have been impressive. Official statistics show a sharp fall in murders, gun-related incidents and other crimes.
But concerns about excessive police violence have been revived in recent months. In June, police killed nine residents, including seven suspected drug traffickers, after an officer was murdered at the Maré complex, forcing the authorities to delay the planned pacification of that vast community. Last week, 10 UPP officers were charged with the torture and killing of Amarildo de Souza, a resident of Rocinha, Rio's biggest favela.
"There is a lack of confidence in the police. The Amarildo case showed that. It's not the first time," said Rodrigo Martins, an observer of the Lins pacification operation from the public defenders' office. "Some people were a little afraid because there were so many police here, but we saw no arrests or incursions today. People are afraid to change."
The transformation has been dramatic.
The Guardian had visited one of the seven Lins communities, Bairro Preto, six months earlier when it was still controlled by Rio's most powerful gang, the Red Command. Back then, armed traffickers kept watch at the entrance of the favela, a makeshift drug factory had been set up in a back alley and dozens of zombie-like addicts lolled around inside a filth-strewn crack den.
The contrast this time was striking. The gangsters had faded into the backstreets and neighbouring favelas, the drug-packaging workshop had moved on and the crack den was empty of all but three sleeping or unconscious addicts. All that was left was a Mary-Celeste-like scene with a still blaring radio and empty tin-foil crack wraps scattered over the floor. The departure of the residents was rapid.
"They were still there last night when I got home," said their neighbour Michelle Xavier. "But it is very quiet now. That's an improvement already. It was noisy all the time before. The crack users never sleep."
Her neighbours expressed amazement at the sight of a first taxi on their street, which drivers had previously deemed too dangerous to drive into.
Another eye-popping change was the arrival of two Sky salesmen, who quickly set up plastic tables for their subscription leaflets on exactly the same spots as the drug dealers had previously used to market their wraps of cocaine and hash.
"I just came today. We always do this after a pacification operation," said Renate Isahu, who said he had already signed up 10 customers. "It's a good time to pick up business." The Claro phone network was also following in the wake of the troops with a team of leaflet distributors.
Most residents were hopeful that pacification would bring an improvement in their lives.

"We won't have to be so fearful. The community will be more peaceful," said Antonia Pereira, who has lived in the Gamba community of Lins for 30 years. "It'll also be good for property values."
In nearby neighbourhoods which had often been targeted by crack users, there was a sense of relief. Claudia Guerreiro said she didn't dare wear jewellery or carry a phone in the street for fear of thieves. Her neighbour said he had been assaulted nine times. "We've experienced so much crime here. I think the police presence will definitely make things better."
But there was more scepticism among those who had previously experienced pacification. Milena Moura had come to Lins from Alemão, a favela that had been the headquarters of the Red Command until it was taken over by police last year.
"I've seen how it works. The police did bad things," she said. "I've no confidence that they will be any better here."
Additional reporting by Sam Cowie