The man who allegedly shot and killed Police Officer Randolph Holder was wanted for questioning in a September shooting and had 18 prior arrests, the NYPD said on Wednesday. Police said Howard — who did two stints in upstate prisons for drugs — was currently in a diversion program.

Howard had an active warrant for a fatal shooting in the East River Houses on Sept. 1, police said, and did not show up to a court date in the middle of September. 

Manhattan DA Cy Vance said in a statement he was "deeply angered and saddened by the senseless murder" and recommended a prison sentence, not diversion, for Howard. 

Holder, 33, died after being shot in the head in East Harlem Tuesday night. Howard was charged Wednesday night with first-degree murder and first-degree robery.

Just before 9 p.m. Tuesday, officers patrolling the roof of a nearby housing complex spotted people firing weapons at each other, according to Dept. Chief William Aubrey, the commanding officer of Detective Borough Manhattan.

A host of officers responded and Howard fled on foot toward the FDR Drive, stopping to rob someone of a bicycle at gunpoint.

RELATED: Officer Randolph Holder the fourth cop to be shot, killed in recent months 

Howard pedaled north on the promenade. When Holder and another officer cut him off at a pedestrian ramp, Howard allegedly put down the bike and fired one shot at them, striking Holder in the head.

Officer Omar Wallace returned fire, hitting Howard in the leg. Howard fled and was apprehended on the FDR Drive between 124th and 125th streets. 

Holder was taken to Harlem Hospital where he was pronounced dead at 10:22 p.m.

Howard was treated for his wounds and brought to the 25th Precinct station house Wednesday afternoon for line-ups before being charged.

Holder, who was born in Guyana, was a five-year veteran of the NYPD. His father and grandfather were law enforcement officers in Guyana.

"I feel so bad," said Maria Felix, who lives in the neighborhood where Holder patrolled and was killed. "I feel so bad. I've seen him from time to time around here. Nice guy."

"I would never think something would happen like this around here. I was scared to send my kids to school," said Katiria Torres. "They go to school right across, but I am so sad about the cop. They are here to protect us. I'm just glad they caught the guy and

I don't know if there are other guys in it. It's just so sad because he was so young."

Police Commissioner Bill Bratton said it was the officer’s father who comforted him after Holder’s death, and offered to greet a room of grieving officers keeping vigil. 

“I’ve lost count,” Bratton said of the number of officers’ funerals he’s attended over the course of his career. “And I’ll be frank with you, it gets worse each time.” 

“There are a small number of people — they number in the thousands — who perpetrate so much of the violence in the city,” Mayor Bill de Blasio said at a press conference. “And we will not stop in the relentless pursuit of this violent few.”

“There’s a disconnect in our society, that somehow people who say they believe in law and order still support the notion of the free flow of weapons, and so often it is our officers who pay the price.”  

Bratton said he was scheduled to travel to Washington D.C. and meet with President Barack Obama on the issue of keeping violent offenders in prison.

"This individual that we believe murdered our police officer, your police officer ... that he's what we're talking about, people who engage constantly in violence but we seem to have the hardest time trying to keep them in jail or prison." 

Holder is the fourth NYPD officer killed in the last 11 months. Last December, Det. Wenjian Liu and Rafael Ramos were shot and killed while sitting in their patrol car in Bed-Stuy. In June, Det. Brian Moore was shot in Queens by a suspect who fired into his car.

Bratton said Wednesday he didn’t see a connection between the four shootings, other than they occurred in a short period of time to one another. 

A wake will be held for Holder on Oct. 27 with a funeral scheduled for the next day. He will be buried in his native Guyana.

Both Mayor de Blasio and Gov. Andrew Cuomo have ordered city and state flags to half-staff until Holder is buried. 

Additional reporting by Bess Adler.