Either drug lords or the militias that oppose them run the slums of Rio de Janeiro, and when the municipal elections arrive, they intimidate local residents into voting for their candidate of choice, often demanding that they take pictures of their ballots as proof.

Candidates that don’t have the support from the local drug lords or a militia leader are also intimidated from campaigning.

This election year, the Brazilian government has deployed thousands of army and navy troops into Rio’s poorest neighborhoods, known as favelas, in an attempt to secure the safety of both the campaigning candidates and the voters.

Mobile devices have also been banned from the voting booths in order to undercut the practice of intimidating voters by demanding photo evidence of their ballot choices.

"We want people -- both candidates and voters -- to be able to express themselves freely, guaranteeing the democratic freedom we enjoy in Brazil," Carmen Lucia, head of Brazil’s electoral authority, told Reuters.

The first round of elections will take place this Sunday, with the military presence in Rio expected to remain through the week leading up to election day and until voting has finished Sunday.

While Rio is the only city where the military has been deployed, local elections will also take place in over 5,000 towns and cities throughout the country.

Among the 20 political parties competing for mayoral and local council seats, President Dilma Rousseff’s governing Workers Party is facing strong opposition in Sao Paulo, Belo Horizonte, Salvador and Recife, according to Reuters.

Nevertheless, Rousseff’s approval rating remains high despite an economic slowdown in 2012 with GDP growth expected to taper off at 1.6 percent, down from 2.5 percent the previous year.