NYPD officers shot and killed an armed man in an exchange of gunfire in the East New York section of Brooklyn on Thursday afternoon, officials said.

Three officers from the 75th Precinct were following up on information of a potential retaliatory gang shooting in the area when they saw a man running from the Cypress Housing development, police said. They followed him in their vehicle for about two blocks before approaching him, police said.

The gunman opened fire the first time near Fountain Avenue and Logan Street just before 4 p.m. as he was being questioned by three officers in their vehicle, an NYPD spokesman said.

“When the sergeant and one officer exited the vehicle, the suspect pulled a revolver and fired at the officers,” Chief of Patrol Terence Monahan said at a news conference Thursday evening. “The officers returned fire.”

With the officers chasing him, the suspect ran two blocks and into the rear yard of a house at 890 Belmont Ave., police said.

“One officer followed the suspect into the rear alley and confronted the suspect, who was still armed,” Monahan said. “The officer fired at the suspect again. The suspect was struck and was pronounced dead at the scene.”

advertisement | advertise on newsday

The gunman fell into the stairwell outside the home, police said. Authorities said his .32-caliber revolver was found in the stairwell, and an NYPD spokesman tweeted a photo of the black and silver gun.

The officers were not struck by the bullets and were taken to the hospital to be examined, police said.

With Anthony M. DeStefano and amNewYork