Rio de Janeiro is preparing to be in the spotlight in the coming years as it hosts the 2014 football World Cup and the 2016 Olympics. Both events are a major test for Brazil, a country trying to confirm its role as an emerging political and economic power. For Rio, this is a unique opportunity to grow, to consolidate itself as a major tourist destination and to face some of its old demons, such as violence and inequality.

Residents are eager to know the advantages and costs involved in becoming the world's central stage. Opportunities abound but the occasion is also riddled with dangers. One of the expected legacies is the expansion of the metropolitan transport network, notably the underground system, currently with just two lines to serve a metropolitan area of 9 million people. On the other hand, real estate speculation is already starting to exert a toll, and some residents of the best areas of the south of the city are having to move to other locations. In order to construct new infrastructure, some slums are being removed and there have been claims that their residents are neither consulted nor compensated adequately. In a few cases, the allegation is that the land from which people are being removed might not be even used for any specific purpose other than to "clean up" the area. Recently, the former Brazil footballer Romário, now an MP, issued a statement underlining that the preparation for major events cannot be enforced by trampling over poor people's basic rights.

However, it is public security that is the basis of both hopes and scepticism. Already Rio's main achilles heel at the time of its candidacy, public security – or the lack thereof – was always on the mind of the world when they thought of holding the Olympics in the "cidade maravilhosa". Providing security for the games themselves is not that hard and has been done in the past in other events, albeit of a minor dimension. It takes intensive patrolling in key areas, contingency plans and the distribution of resources through social projects so that everyone has a stake in the success of the event.

But the real issue is security up to the games and, most importantly, afterwards. In a scenario traditionally dominated by violent criminal gangs that rule over small territories and their populations, the often brutal intervention of police forces who "invaded" poor slums only exacerbated the violence. In recent years, Rio police acknowledge they have killed more than 1,000 suspects a year, and are often accused of committing summary executions. On the other hand, more than 100 police officers are also executed yearly off-duty.

In 2008, the government started a new policing programme called "pacifiying police units" (UPPs), with the declared aim of reducing shootouts in the slums while also releasing these communities from the control of the gangs. The new police officers stay permanently in those slums, rather than "invade" them periodically, and try to develop a community approach. In a revolutionary shift, the aim is not to win the unwinnable "war on drugs" any more, but to protect the population. Relationships between police and poor communities are not easy after decades of clashes, but homicides appear to have declined sharply in these areas, which have also been freed from the control of armed gangs. Drug-selling goes on but without weapons or intimidation – just as you find in most other cities in the world. The initiative has received wide social support but legitimacy within the police looks uncertain: recent research showed that 70% of officers in the UPPs would rather return to "normal policing".

The central problem is that there are only 17 UPPs and hundreds of slums. It is apparent that the government will not have enough manpower to expand this strategy to the metropolitan territory as a whole. Unsurprisingly, pacified areas prioritise middle-class and tourist neighbourhoods, as well as those where major sports events will take place. The crucial question is whether this new local policing intervention can be used to induce a global effect, for instance modifying the old police doctrine that has long privileged "shootouts against the enemy" and also inducing organised crime to act with lower levels of violence, such as is the case now in the pacified areas. If the global impact is indeed achieved, the city may look to a brighter future. Failing that, the risk is that in 2017, once world attention and economic fluxes of capital have migrated elsewhere, the city may go back to its old ways and a blood bath ensues.