An 18-year-old teen fatally shot a police officer in a Florida neighborhood on Sunday while attempting to kill himself to avoid going to jail, his arrest warrant stated. 

Deputies with the Hollywood Police Department arrived at Emerald Hills neighborhood on Sunday night after receiving reports that a man was “going house to house” on a bicycle while attempting to break into cars.

Also Read: US Court convicts NYC man for giving aid to Taliban against America

Officer Yandy Chirino was the first to spot the accused, identofied as18-year-old Jason Banegas. When Chirino tried to arrest Banegas, the latter resisted, causing a struggle during which the accused pulled out a stolen semi-automatic handgun.

When the second officer arrived at the scene, he found Chirino with a gunshot wound. He managed to take the accused into custody. In the meantime, Chirino’s fellow officers arrived at the scene and rushed him to Memorial Regional Hospital, where he was pronounced dead of a gunshot to the face.

Also Read: US Capitol Police arrest man in ‘suspicious vehicle’ outside Supreme Court

Banegas told investigators during interrogation that he pulled his gun to kill himself in order to avoid arrest.

“The officer kept moving around during the struggle” and the accused ended up pulling the trigger and shooting the cop, the arrest warrant said.  The gun used was stolen from a car in Miami-Dade County in September.

Banegas confessed to the break-ins and to resisting his arrest.

“He stated he was being disrespected by the officer and panicked because he was carrying a concealed weapon and did not want to go back to jail as he was just released 30 days ago,” the warrant said.

Banegas has since been charged with first-degree murder and multiple other charges. He made his first appearance in court on Tuesday. He was being held in jail without bond.

Banegas was recently released from a juvenile detention center for selling cocaine.