rochina favela rio de janiro brazil
Rio's favelas are popular with tourists (file photo) Chris McGrath/Getty Images

Police in Brazil accidentally killed an elderly Spanish tourist during a shootout with a drugs gang in a notorious Rio de Janeiro favela, according to Spanish media.

The 67-year-old woman was travelling in a vehicle with her brother and her brother-in-law when military police and drug traffickers clashed in Rochina, the largest favela in the Brazilian capital.

Police said, in a statement, that the tourists' vehicle had crossed a security cordon imposed around the area where gun squads were operating.

Upon seeing the unknown car, officers shot it up – only realising that the elderly group were not drug dealers when it was too late.

The victim was rushed to the nearby Miguel Couto hospital but died shortly after arriving as a result of bullet wounds, El Mundo reported.

Two officers were wounded in the gunfight – one in the head and the other in the chest – but both are said to be in a stable condition.

The favela Rocinha is one of the largest in Latin America and a big tourist attraction despite the dangerous streets where murder is an almost daily occurrence.

Jeep guided tours are popular with many tourists, who want to see the daily lives and environment of Brazil's poorest, whose way of life has been popularised by films such as City of God.

When Rio hosted the Football World Cup in 2014, the government rolled-out a 'pacification' program in a bid to make the favelas safe for tourists to roam. The England team even paid a visit.

Around 1.4 million residents, or approximately 22 percent of Rio's population, live in favelas, which are plagued by gang violence.

Rochina has always been considered one of the city's safer favelas and most houses enjoy sanitation, plumbing and electricity. However, in recent weeks the army intervened in the area because police had lost control of the neighbourhood.

rochina favela rio de janiro brazil
The Rochina Favela is the largest in Rio Chris McGrath/Getty Images