Brazil’s biggest annual celebration came to a close amid several indications of deepening insecurity in Rio de Janeiro, as well as ongoing concerns about corruption and criminal infiltration of politics in the country’s second-largest city.

Despite the 17,000 police working throughout the February 9 to February 13 holiday, violence was a significant issue as mobs of youths assaulted and robbed tourists in areas customarily thought to be safe. Meanwhile, confrontations with criminals left three police dead and two wounded.

The samba schools, several of which used their high-profile parades to highlight issues of insecurity and corruption, themselves were marred by allegations of graft.

Beija-Flor, the eventual carnival champions, included in its exhibition depictions of gang violence in marginalized neighborhoods and a giant rat meant to symbolize corrupt politicians. At the same time, the president of the organization is currently contesting a 48-year conviction for racketeering and corruption. The president of another major samba school is also being investigated for money laundering.

The security problems during Carnival seemed to stem from a lack of organization on the part of city officials. Mayor Marcelo Crivella was traveling in Europe for the entirety of the festivities, and the security plan for the event changed drastically in the middle of the holiday after the spike in violence. (Last year, thousands of military police were sent to the city ahead of the celebration to reinforce security.)

On February 16, just days after the end of Carnival, President Michel Temer signed a decree for the national military to take total control of security operations in the state of Rio de Janeiro, including assuming command of civilian police forces. The federal intervention will last until the end of the year.

InSight Crime Analysis

Rio’s carnival was hoped by many to provide a respite from the problems that have plagued the city. Instead, the event served as a reminder that the issues of rising violence and deep-seated corruption remain front and center in the minds of the Brazilian public.

As reflected in a number of the samba school performances, recent surveys have shown mounting concern among Rio’s residents about insecurity related to gang violence. Entire neighborhoods have come under siege as crime groups continue to battle the police and each other.

The official response to the crisis — repeated waves of militarization — has not shown long-term success. And the head of the armed forces recently warned that involving the military in civilian security operations could lead to corruption among the troops. But momentum for a change in strategy has been hindered by a lack of resources and political will.

SEE ALSO: Brazil News and Profiles

Likewise, the allegations of corruption against leaders of the samba schools point to a system that is still struggling to deal with deep-rooted graft.

Despite a years-long anti-corruption drive that has reached the highest echelons of political and economic power in Brazil, the issue is playing a prominent role in the run-up to general elections scheduled for October — particularly in Rio. A Federal Police report recently obtained by O Globo highlighted the risk of partnerships between local politicians and the heads of criminal organizations aimed at influencing the outcome of the elections.

This report comes on the heels of accusations that President Michel Temer’s pick for labor secretary, Cristiane Brasil, paid drug traffickers for exclusive access to campaign in 2010 in a suburb of Rio. Crime groups were also accused of attempting to intervene in 2016’s municipal elections in Rio through a combination of political violence and illicit campaign financing.