BUFFALO, N.Y. (AP) — A Buffalo police officer is recovering from a gunshot wound to the head suffered when a motorist he had pulled over opened fire. Another officer then fatally shot the suspect.

Officials say the officers were conducting a traffic stop around 5 p.m. Sunday in the city's Riverside neighborhood when the driver they had pulled over began struggling with one of the officers and shot him once in the head.

The suspect was shot by the other officer but managed to flee a short distance on foot. He was taken to a hospital, where he was pronounced dead.

The wounded officer underwent surgery at Erie County Medical Center. Police officials say he's expected to survive.

Authorities haven't released the names of the suspect or the two officers.