Rio de Janeiro: Brazilian interim President Michel Temer declared a day of national mourning on Friday after the death of a National Force officer who was ambushed when his patrol car veered into a notorious favela by mistake on Wednesday.

Helio Vieira Andrade, 35, a member of the 85,000-strong security apparatus for the Rio Olympic Games was in the car with two other officers, when they took a wrong turn to exit the Yellow Line onto the Red Line, two heavily-used expressways.

Officers from the Brazilian National Force patrol the entrance to Vila do Joao neighbourhood - where a sign welcomes visitors - after one of their own was killed in the area. Credit:Agencia Brasil

Their car was attacked with machine gunfire when they entered Vila do Joao, a favela inside the crime-ridden complex known as Mare. Andrade who was driving was hit in the head and died late on Thursday night in hospital after surgery. The two other officers were injured but not seriously hurt.

Andrade, from the northern state of Roraima, was living in Rio for the Olympics and had hoped to buy a car with his improved salary, Globo reported.