By Gary Duffy
BBC News, Sao Paulo
A senior United Nations official has harshly criticised police in Brazil for involvement in large numbers of extra-judicial killings.
Police are accused of acting with virtual impunity
Philip Alston, the UN's rapporteur on the issue, was speaking at the end of an 11-day fact-finding visit.
He said there was strong evidence that many of the 694 people killed by police in the first half of the year in Rio de Janeiro were extra-judicial killings.
Officials say firm action against crime is needed to safeguard civil rights.
Mr Alston will not compile his final report until March next year, but his initial conclusions are harsh and will not go down well with the Brazilian authorities.
He told a news conference that the people of Brazil did not struggle valiantly for 20 years against a military dictatorship to make the country free, only for officers to kill with impunity in the name of security.
Mr Alston will deliver his final report next year
Some officers, he said, participated in the activities of militias and death squads.
Mr Alston referred to the 694 people killed by police in the first half of this year in Rio de Janeiro and whose deaths were classified by the authorities as acts of resistance.
This was often a euphemism for extra-judicial executions and virtually ensures impunity, he said.
One of this year's largest security operations in the city took place in June in the Alemao shanty town.
Mr Alston said he was staggered that an operation involving 1,300 officers resulted in 19 deaths, and that officers only seized a dozen weapons, and that the most important drug dealers were not arrested or killed.
He suggested the operation was driven more by political than security concerns.
His remarks seem certain to anger the authorities in Rio, who argue they are confronting a major threat from the city's drug gangs.
A spokesman for the state government said such conflict was undesirable, but in the name of civil and human rights, there was no way to back down from this obligation.
Among Mr Alston's initial recommendations were higher police pay, better forensics, improved witness protection and effective investigations into police killings.
This is not the first time that UN officials have reached damning conclusions about the police in Brazil and given the level of criticism, it seems unlikely to be the last.