Police Officer Randolph Holder was shot and killed while responding to a call on Oct. 20, 2015. View Full Caption NYPD

MANHATTAN — An NYPD officer was shot and killed Tuesday night in a shootout with a suspect in East Harlem, officials said.

Officer Randolph Holder, 33, was shot in the head when he and his partner responded to a report of gunshots in a park at East 102nd Street and the FDR Drive at roughly 8:30 p.m., according to sources and Police Commissioner Bill Bratton.

Holder was a five-year NYPD veteran and was assigned to the department's Housing Bureau. He worked out of PSA 5.

"We're all in mourning tonight. The whole city is mourning," Mayor Bill de Blasio said at a press conference late Tuesday night.

"We are humbled by Officer Randolph Holder's example, an example of service, courage and sacrifice. We offer our prayers to his family."

Bratton, speaking at the same press conference, said that after Holder and his partner responded to the call of what sources say was a gang related shoot out.

When the officers arrived the suspects scattered and Holder and his partner gave chase.

Sources believe that the shooter robbed a man of his bicycle in order to make a getaway.

The two plainclothes officers confronted the suspect on the bike near a pedestrian overpass, Bratton said. When they approached him, the man opened fire.

Holder was struck in the head and rushed to nearby Harlem Hospital, where he died a short time later at roughly 10:22 p.m.

"He ran towards danger," Bratton said. "It was the last time he'd respond to that call."

Officers investigate the scene of the shooting on the FDR Drive and 120th Street Wednesday morning. Photo Credit: DNAinfo/Trevor Kapp

The suspect fled on foot but was captured by additional officers a short time later, Bratton said. The unidentified suspect had gunshot wounds to his leg.

He was taken to New York Presbyterian-Weill Cornell Medical Center, but was expected to be discharged into police custody later Wednesday morning, Bratton said.

Three other men were in custody and being questioned about the incident, Bratton said.

A gun was recovered at the scene, sources said, and NYPD divers in the Harlem River recovered a loaded magazine containing 30 bullets.

Officials could not immediately provide additional details.

Dave Wilkins, who lives at the nearby Wagner Houses, said he heard gunshots and saw officers swarm the FDR Drive in the immediate aftermath.

"I heard seven shots, 'Bop! Bop! Bop!' It was rapid fire. It sounded high caliber,” Wilkins, 37, said. "The officer was on the overpass. They put him on a stretcher. Cops were surrounding him. It looked like One Police Plaza."

"It was sad to see. I feel sorry for his family. Why would a man or kid do that? You shot a cop for what?"

Holder, who was unmarried, was an immigrant from Guyana where his father and grandfather had both served as policemen, Bratton said.

The FDR Drive was closed in both directions between 96th Street and 125th Street early Wednesday morning, the city's Office of Emergency Management tweeted.

The killing was the second of a NYPD officer this year.

Officer Brian Moore was shot and killed in his squad car in Queens back in May.

Two others officers, Rafael Ramos and Wenjian Liu, were executed in Brooklyn as they sat in their patrol car last Dec. 20.