RIO DE JANEIRO, Nov 19 (Reuters) - A police helicopter in Rio de Janeiro crashed Saturday evening, killing four officers after a day of intense firefights between law enforcement and suspected criminals in the slum known as City of God.

It was not clear whether the helicopter had been hit by gunfire or whether another factor caused it to go down. In a statement, the police said they were investigating.

Amateur video sent to local television stations showed the aircraft spinning as it appeared to plummet straight down. The helicopter fell in a populated area near City of God, but crashed in an open space near a major highway.

Firefighters extricated the victims’ bodies from the wreckage Saturday evening.

Crime and violence have rebounded across Rio, just months after Brazil’s second-biggest city hosted the 2016 Olympics.

An economic recession, rising unemployment and overstretched public finances have emboldened criminal groups in areas like City of God, one of the best known of the city’s so-called favelas, sprawling slums that stretch across vast suburbs and climb up the scenic hillsides of central Rio.

In recent years, police had successfully pushed out drug traffickers and other gangs from many favelas.

Still, crime is now worsening just as the state government, responsible for most security across a region of more than 16 million people, faces an expected budget shortfall of about 20 billion reais ($5.91 billion).

The murder rate across Rio through September climbed almost 18 percent from the same period a year earlier, to 3,649 reported deaths, according to state statistics. Street crimes, including heists on public transport, surged by 44 percent, to nearly 92,000 reported incidents.

Though crime in Rio remains far lower than its peak in the 1980s and ‘90s, recent firefights and the crash on Saturday recalled periods in which the city erupted in conflict.

In 2009, drug traffickers shot down a helicopter, killing two crew members, as police were seeking to “pacify” favelas ahead of the Olympics and 2014 World Cup, also played partially in Rio.

The 2009 incident, the first downing of an aircraft by criminals in Rio, underscored the challenge for law enforcement in a city where heavily armed gangs increasingly possess enough firepower to contend with state security forces.