MIAMI-DADE COUNTY, Fla. (WFLA) — A Miami-Dade police officer has died after he was critically injured during a shootout in Miami’s Liberty City neighborhood on Monday evening.

The Miami-Dade Police Department said Detective Cesar Echaverry, 29, was rushed to a local hospital after the shooting. He died on Wednesday.

“It is with great sadness and heavy hearts that we announce the untimely passing of Officer Cesar “Echy” Echaverry. Surrounded by loved ones, Echy succumbed to his injuries after a brief battle for his life,” said Alfredo “Freddy” Ramirez III, Miami-Dade Police Director & Chief of Safety and Emergency Response.

WPLG report said that the series of events that led up to the shooting began with a robbery.

Police said the suspect, identified as Jeremy Horton, 32, took off in a car before he was involved in a head-on crash with another vehicle that was carrying a child and an adult. Neither the child nor adult were injured.

Police said that a shootout followed the crash. Horton died at the scene.

“Officer Echaverry died in the line of duty while serving and protecting our community. Our law enforcement family will continue to stand beside and support the Echaverry family through this difficult time. We’ll never forget Officer Echaverry’s bravery and sacrifice. Godspeed, brother,” Ramirez said.