WHAT BEGAN as a routine traffic stop turned deadly early yesterday when police shot a man as he allegedly reached for a stolen gun.

Just before 3 a.m., two officers on patrol spotted Brandon Tate-Brown, 26, driving a white Dodge Charger with Florida plates in Mayfair, police said.

The Frankford resident didn't have the headlights on, police said, so the officers flagged him down from their patrol car, pulling him over on Frankford Avenue near Rowland.

When the officers approached the Charger, they spotted a Taurus .22-caliber handgun in its center console, police said. They asked Tate-Brown to exit, and a fight broke out.

During the scuffle, Tate-Brown forced his way back into the Charger and "attempted to retrieve the gun," police said.

One of the officers fired a single shot, striking Tate-Brown in the head, police said. Medics pronounced him dead at the scene minutes later.

Upon further investigation, detectives discovered that the gun was reported stolen last July and had been loaded with eight rounds, police said.

No one else was injured in the incident, although one of the officers was taken to a nearby hospital for observation, a police spokeswoman said. It was unclear last night why he was hospitalized.

The officer who fired the shot has been placed on administrative duty as the Homicide and Internal Affairs units complete their investigations, per standard police procedure.

Both officers involved have been with the department since May 2013, a police spokeswoman said.

Tate-Brown, of Horrocks Street near Pratt, had previous brushes with the law: He pleaded guilty to two counts of aggravated assault as well as a firearms violation in 2008, court records show.

He was released from prison on those charges in 2012, and was on a five-year parole when he was shot, police sources said.

Last night, Tate-Brown's family and friends gathered at the scene of the shooting for a candlelight vigil.

They questioned his death, claiming it was unnecessary for the officers to shoot him.