A 27-year-old man suspected in a homicide was shot by police during a struggle with an officer Friday afternoon in the city's Strawberry Mansion section, police said.

About 2:45 p.m., two 22d District officers stopped a gray sedan for a routine traffic violation in the 3200 block of Oxford Street and obtained identification from the driver, Maceo Emerson Waring, said Lt. Raymond Evers, a police spokesman.

The officers ran a check on Waring and found he was wanted in connection with a homicide, Evers said. The officers then approached both sides of the car. The officer on the driver's side attempted to get Waring out.

As the officers tried to arrest Waring, a struggle ensued, with Waring attempting to grab one officer's gun, Evers said.

The other officer fired two shots at Waring, Evers said. The struggling officer gained control of his gun and fired one shot.

Evers said Waring was wounded twice and was in critical but stable condition at Temple University Hospital.

Waring, of the 1100 block of South Paxon Street in Kingsessing, is a suspect in the death of 24-year-old Naeem Giles.

Giles was shot several times in the 4600 block of Horrocks Street in the Northwood section on Sept. 10. He was pronounced dead at the scene.

Waring has been in and out of prison for most of his adult life. He has been convicted four times of drug dealing and has served various prison sentences.

He was once arrested in a shooting, but the case was withdrawn.

Giles had recently been released from prison for a robbery conviction.

The names of the officers were not released. They will be assigned to administrative duty while the shooting is investigated by Internal Affairs.

Contact Robert Moran at 215-854-5983 or bmoran@phillynews.com, or follow @RobertMoran215 on Twitter.