RIO DE JANEIRO (Reuters) - Brazil’s army on Monday said it had arrested 10 soldiers and charged them with shooting into a car carrying an innocent family in Rio de Janiero, killing the driver and injuring two other people.

The incident has highlighted the risks of a growing militarization of public security in Brazil, where violence spurred by warring gangs led to a record 64,000 murders in 2017. Over the last few years, Brazil has come to rely more heavily on the military to take over law and order from poorly trained, financially stretched state police forces.

According to TV Globo, the soldiers fired dozens of rounds into the car on Sunday evening after confusing the vehicle with one used by alleged gang members who had shot at them.

In a statement, the Eastern Military Command said 10 of the 12 soldiers involved in the incident were arrested, due to inconsistencies between their initial statements and facts that later came to light. They were charged with “noncompliance with rules of engagement” and their case will be heard by military justice, the Eastern Military Command added.

For much of last year, Brazil’s military took over public security in Rio de Janeiro state.

The number of murders in 2018 fell 7 percent from the previous year to 4,950, state data show. Still, the number of people killed in confrontations with security forces rose 36 percent over the same period.

President Jair Bolsonaro, a former army captain who later served nearly three decades as a Rio de Janeiro federal lawmaker, took office on Jan. 1 vowing a hard line to confront Brazil’s violent gangs.

In its statement, the Eastern Military Command repudiated excesses or abuses committed by soldiers, and reiterated the army’s “commitment to transparency and legal parameters imposed by the rule of law to the legitimate use of force by its members.”