RIO DE JANEIRO — Shooting from helicopters, armored personnel carriers or at close range, police officers in Rio de Janeiro have gunned down 558 people during the first four months of the year — the highest number in this period since the state began keeping records more than two decades ago.

This recent spike comes after years in which the federal and local authorities put in place policies that significantly diminished police killings. But as the country dove into a deep economic and political crisis in 2014, resources for security programs dried up. Criminal gangs reclaimed lost territory in Rio, and across Brazil violence exploded: More than 51,500 people were killed last year.

Voters went to the polls in October and gave their support to candidates who promised to fight violence with violence by relaxing gun ownership rules and allowing the police to fire on armed suspects.

The number of people killed by the police in Rio de Janeiro jumped in 2018 to a high of 1,538, according to state statistics. If killings continue this year at the current pace — nearly five a day — that record will be beat.