A San Diego police officer shot and wounded a naked man after a scuffle over the officer's gun, police said Monday.

A woman had called police about noon to report that the man was trying to break into her home in the Mira Mesa neighborhood.

When the officer arrived, a neighbor was standing by with a baseball bat to defend himself against the man, who was standing barefoot amid glass shards from a broken window, according to Lt. Michael Hastings.

The burglary suspect charged at the officer and, after an "extended" fight, pushed him through wooden slats of a sideyard fence, Hastings said. The officer attempted to subdue the man with a Taser "but it had no effect," Hastings said.

The man again charged at the officer and tried to grab his gun from his holster. The gun fell to the ground. The officer grabbed the gun from the ground but the man "tried to disarm the officer again," Hastings said.

The officer fired once, hitting the man in the torso. Still, the fight continued until other officers arrived and subdued the man and put him under arrest.

The suspect was taken to a hospital where he remains in fair condition, Hastings said. He was identified as Philip Anthony McMahon, 27, of San Diego.

The officer was identified as Christopher Gripp, a five-year veteran of the police department.