One person was shot and killed as violent protests erupted on Tuesday in Rio's famed Copacabana beach district following the death of a dancer allegedly at the hands of police, less than two months before the FIFA World Cup 2014.

Two main thoroughfares were closed after angry demonstrators from a slum set ablaze barricades of tires and hurled glass bottles to protest the death of the dancer, 25, whom Brazilian media say was killed after police mistook him for a drug trafficker.

In the resulting protests, a 30-year-old man died after being shot in the head in the slum, which is just a stone's throw from Copacabana beach, media quoted city hall officials as saying.

Many in economically booming Brazil are outraged at the huge footprint of poverty here. Critics are furious that billions of dollars have been spent on World Cup infrastructure instead of public housing, roads, more aid for the poor and ending violent crime.

The protesting victim was taken to hospital but was dead on arrival, broadcaster Globo's G1 web portal quoted health authorities as saying. It was not immediately clear who shot him.

Trouble began in the early evening in the Pavao-Pavaozinho favela, which nestles above the well-heeled tourist centers of Copacabana and Ipanema, before quickly spreading, witnesses said.

"It started around 5:30 pm. There was smoke everywhere, shots in the street and people racing for their homes," said a young man living just next to the favela, or slum. "A number of police special unit trucks have just gone up into the favela. We are stuck at home – we can't go out," he added, as helicopters flew over.

Another resident said electricity supplies had been cut in the area and the situation remained tense. G1 meanwhile reported violence had spilled over into Ipanema as some youngsters went on the rampage there, pursued by police.

'Don't come'

Police have been cranking up efforts in recent months to clear favelas in thrall to violent criminals before the month-long World Cup kicks off on June 12. Although a huge slum "pacification" program was launched six years ago and gradually been rolled out to improve security in a city which will also host the 2016 Olympics, the gangs have been fighting back

Friends of the dancer, Douglas Rafael da Silva Pereira, alleged he was beaten to death after attempting to take refuge in a school in the slum, where a Police Pacification Unit (UPP) was set up in December 2009 as part of efforts to smash organised crime.

"The circumstances surrounding the death of Douglas are under investigation. An on-site report indicates Douglas's injuries are compatible with a death caused by a fall," police said in a short statement. "Witnesses and residents will be called upon to give evidence," the statement added.

The dead man's mother said: "He died at one in the morning. More than 12 hours afterwards we got to see the body. He was in a defensive posture, all beaten up... There were no signs of gunshot wounds," she added, saying that her son had gone to the favela to visit his four-year-old daughter.

One resident of Pavao-Pavaozinho, Daizy Carvalho, who works for a human rights group, said of Douglas: "He was a mirror for youngsters, who are in revolt. What kind of World Cup is this?" she asked. "The people from the favelas need to unite and come out onto the street," she said, calling on tourists "not to come to the Cup".