The man accused of killing NYPD officer Jonathan Diller was arrested 21 times including as recently as last April, according to police sources.
Guy Rivera, 34, has a long history of drugs and violence charges, records show.
His most recent arrest for a gun-related charge took place in April last year before he was turned loose on the streets again after making bail, police confirmed.
Rivera is accused of gunning down Diller, 31, during a traffic stop on Monday. A second 41-year-old man who was driving the vehicle was also arrested, and a firearm was recovered at the scene.
Mayor Eric Adams expressed incredulity that Rivera had been allowed back on the streets given his recent gun charge.
Accused NYPD cop killer Guy Rivera has a long rap sheet of 21 arrests including one last April for gun charges, police confirmed
Officer Jonathan Diller, 31, of New York's 105th precinct was just three years into the job
Officer Diller lived with his wife Stephanie and their one-year-old son (pictured) in Massapequa Park on Long Island in New York City
'April 2023. Less than a year, gun charge, he's back on the streets. April, 2023,' he told a press conference.
'This is what you call not a crime problem, a recidivist problem: same bad people doing bad things to good people. Less than a year. He's back on the streets with another guy.'
The charge is the latest to be added to Rivera's rap sheet, which also features an arrest for attempted aggravated assault.
Rivera was sent to Southport Correctional Facility for the offense in 2011, before being released.
Five years later he was back in jail at the supermax Upstate Correctional Facility for selling drugs and another assault charge.
Diller and a colleague were working in Far Rockaway as part of the NYPD Critical Response Team focusing on car crime.
When they asked the 34-year-old suspect to step out of the car he refused, pointed a gun at the officers and fired, hitting Diller in the torso just below his bullet-resistant vest.
Rivera 'was asked to leave the car, he was given a lawful order numerous times to step out of the car, he refused,' NYPD Chief of Detectives Joseph Kenny said.
'Can I say it any clearer?' New York Mayor Eric Adams told a press conference, 'It is the good guys against the bad guys'
Neighbors heard shots ring out at 5:50 pm, less than two blocks from the NYPD's 101st Precinct stationhouse before seeing the fatally injured officer lying in the street
'And when the officer took him out of the car, instead of stepping out of the car he shot our officer.'
Witnesses heard the shots ring out at 5:50 pm, less than two blocks from the NYPD's 101st Precinct stationhouse.
'It happened so fast,' Melissa Morgan, 39, told the Daily News.
'The police officer fell on the floor and the other officers dragged the two guys out of the car. I was running for cover.
'He shot a cop, it's unbelievable.'
'He was rolling around on the ground saying, "I'm shot, I'm shot,"' another witness said.
Witness Deon Peters said he saw two people, including the officer, on the ground.
'He was moving, he was saying "I'm hit, I'm hit!" Giving location and all that,' Peters told the NY Post, 'Like he was crying.'
Diller and a colleague were working in Far Rockaway as part of the NYPD Critical Response Team focusing on car crime
Diller's colleagues lined the streets as his body was transferred to an ambulance outside Jamaica Hospital
Firefighters salute as the ambulance transporting the body of New York City Police Officer Jonathan Diller exits Jamaica Hospital Medical Center Queens
Diller was just three years into his role as an NYPD officer when he was fatally shot
Diller managed to grab the gun from his killer after the other officer returned fire and hit the gunman in the back.
The officer was just three years into the job when he was fatally shot.
Heartbreaking photos show his colleagues and other emergency workers saluting and lining the street outside Jamaica Hospital in Queens where Diller's body was transferred to a waiting ambulance.
Diller leaves behind his wife of six years Stephanie and their one-year-old son.
A GoFundMe set up for his family has already amassed nearly $40,000 since it was set up just hours ago.
His brother-in-law Jonny Mac vowed to take care of Diller's son in his absence.
'What started out as an everyday car stop, instantly became a moment where so many lives would be turned upside down. Jon leaves behind a wife and a one year old son who will now grow up without his father.
'To those of you out there in the streets, it can be so easy to become wrapped into the moment. To think horrible events like this cant happen to you. To become focused on making that next arrest or racing to the action. Remember those who love you at those moments.
Diller leaves behind his wife Stephanie and their one-year-old son
A GoFundMe set up for his family has already amassed nearly $40,000 since it was set up just hours ago
'Jon, there are no words to describe how devastated we are that you are gone. You were a good man and a great father whose shoes can never be filled. I swear to you that I will look after your son as if he were my own. For the rest of my life.'
President of the Police Benevolent Association asked for prayers for the family and questioned why the shooter felt emboldened to attack.
'Our hero police officer confronted this dangerous individual knowing that he was putting himself at risk, knowing that he had a family waiting for him at home,' he said.
'But he did it to protect the people of this city, and we need every single New Yorker to be with this family.
'Why did this violent individual with the gun have no fear to shoot a New York City police officer? Why? Why did he feel that he could shoot a New York City police officer? These attacks on New York City police officers have to end right now.'
Last year saw a record-breaking amount of New York cops attacked on the job, with more than 5,000 recorded in 2023.