Four police officers have died after their helicopter crashed over Rio de Janeiro's notorious City of God favela.
In video footage of the crash, sustained gunfire can be heard before the helicopter drops from the sky, narrowly missing a main road.
The helicopter was giving support to a police operation against gangs in the favela, according to police.
Police reportedly began a large scale operation on Sunday in western Rio, with arrests and seizures of drugs.
'Fell in a ditch'
There had been several clashes during Saturday between police and criminal gangs operating in the City of God favela area.
Firefighters removed the bodies of the victims from the wreckage, which could be seen in the footage crumpled and smoking.
A police spokesman said that forensics officers were examining the wreckage to determine the cause of the crash.
One man who saw the incident, Thiago Duarte, told Associated Press: "We were here watching the shooting in the woods... Suddenly a friend shouted 'the bullets reached the helicopter, it's going to come down!'
"It was clear that [the pilot] was trying to do everything to avoid falling over the shanty town or on the expressway, so it turned back and fell into the ditch."
On Sunday, police backed by an armoured vehicle carried out further operations, with at least two people arrested, another injured and a number of drugs seized.
Rio state security secretary Roberto Sa said police were investigating a territorial dispute between members of two favelas in western Rio.
If the helicopter was shot down by gang members, it would not be a first for the city, which hosted the 2016 Olympics.
In 2009, drug traffickers opened fire on a police helicopter, causing it to explode and crash land on a football pitch, killing both pilots.
Violence has been on the rise in Rio over the past two years following the failure of a 2010 programme to rid the favelas of drug gangs.
A total of 3,649 murders were reported in 2016 up until the end of September, a rise of almost 18% on the same period last year.