A man was shot and killed by police after he fired on officers in Brooklyn Thursday afternoon, cops said.

The exchange of gunfire happened around 4 p.m. near 890 Belmont Ave. in East New York, the NYPD's Chief of Patrol Terence Monahan said.

Monahan said a sergeant and two officers were inside a patrol vehicle near Fountain Avenue and Logan Street when they spotted a man running near the Cypress Hills public housing complex. Based on information of a possible retaliatory shooting in the area, the officers began to follow him in their vehicle.

After about a two-block pursuit, the sergeant and one of the officers got out of the car and began to approach the man, who then drew a .32 mm revolver and fired at them, Monahan said. Police returned fire and a foot chase ensued.

The suspect ran about two blocks and ducked into the backyard at 890 Belmont Ave., where one officer followed and confronted the suspect, who was still armed. The officer then fired at the suspect, hitting him, Monahan said.

The man, who has not been identified, was pronounced dead at the scene, Monahan said.

A police officer also suffered minor injuries and was taken to Jamaica Hospital Medical Center, the FDNY and NYPD said. 

Prior to the incident, police were alerted about a potential retaliatory shooting in the area, which was related to a shooting that occurred Saturday, Monahan said.

The investigation is ongoing, police said.