When it was first announced, the selection of Brazil to host both the upcoming 2014 World Cup and the 2016 Olympics was a cause for celebration. However, the country’s preparations to host these mega-events have exposed major rifts in Brazilian society.

The most coverage so far has gone to the protests that have taken place in major cities around the country. What started as a reaction to increased transit fares evolved into more generalized expressions of frustration over deficiencies in a range of public services, including education.

But even as the Brazilian government has moved to try and reach an accommodation with protesters, clashes with police have highlighted another important trend emerging in Brazil and other countries in Latin America: the militarization of the police force.

As Brazil prepares for the World Cup and the Olympics, there has been a push to quell drug gang activity and violent crime in the favelas, the shantytowns that have sprung up around Brazil’s cities as more people migrated from the countryside to urban centers in search of jobs.

This has led to police occupations of favelas, risky helicopter chases, and shoot-outs that have caused some residents to accuse the police of being on a permanent wartime footing with the population.

While the upcoming sporting events have focused more international attention on these issues in Brazil, they’ve been ongoing for some time. In 2009, Human Rights Watch documented police attempts to pass off extrajudicial killings as police self-defense, or “resistance killings.” One of these included the shooting of an 11-year-old boy.

Analysts believe a key reason for these problems is the blurring of lines between the responsibilities of civilian and military police forces in the country, not to mention some weird overlaps with other military branches. For instance, it appears that the Civil Police might have used a navy machine gun in the recent helicopter shootout with a drug trafficker, and it’s not even clear that the navy knew they were doing so. And reports indicate that the police mission was to kill the drug trafficker. Only later did the head of police suggest that perhaps they should have gone for an arrest instead.

In general, the Military Police are supposed to do more what one might consider “beat cop” work — regular patrols around a specified area — while the Civil Police are supposed to do more of the investigative work and responding to crimes. But there continue to be instances of Military Police also gathering intelligence, occupying favelas, and making arrests, duties purportedly under the purview of their Civil counterparts.

Brazil is far from the only country in the region to see this overlap of more civilian law enforcement efforts and military responses to crime. Guatemala and Honduras have used their militaries to try and improve the internal security of their countries.

For the most part, this is done to try and compensate for poorly trained police forces, or explained as a stopgap measure to fight crime while the police forces undergo reforms. However, the UN has expressed concern that these measures are undermining civilian control of law enforcement and diverting resources from police.

Honduras has even gone so far as to merge the responsibilities of Ministry of Defense, which deals with the military, and the Ministry of Security, which controls the police, a move that calls into question claims that the military’s policing responsibilities are a temporary measure until the police are professionalized.

Beyond that is the fact that, in both Central American countries, the military has yet to be held accountable for human rights violations committed in the recent past. In Honduras, the military has a much worse reputation than police for both corruption and human rights violations. Honduran prosecutors have received 150 formal complaints about extrajudicial, death-squad-style killings in the past three years.

Even Chile, a Latin America country often cited as one of the best examples of a stable democracy emerging from dictatorship, has received criticism for overzealous application of an anti-terrorism law to repress activists, in this case indigenous Mapuche protesters. Police violence, including shootings that have injured Mapuche children, has been met with impunity.

Dependence on the military for law enforcement puts the government on a wartime footing with its people, which will ultimately undermine both human rights and security.