A naked man was shot by police after trying to break in to a home in Mira Mesa, police said.

The man in his 20s was taken by ambulance to a local hospital following the shooting in the 7900 block of Merrington Place. San Diego police said on Monday afternoon that he was in critical but stable condition.

The incident happened just after noon. David Bacoka, who lives at the home, told NBC 7 that his mother was at the house when the intruder tried to break through several windows.

She called 911, he said.

"My mom called me and told me there was a naked guy trying to break in all the windows," Bacoka said. "And so he's pounding on the windows and all the doors and she said she ran, she called 911 and then ran to the neighbor's house."

Officers responded and confronted the intruder, who then attacked an officer. The suspect pushed the officer through the wood panels of a fence into a neighboring yard.

Again the suspect charged at the officer, according to police, and he tried to remove the officer's gun from its holster, causing it to fall to the ground.

The officer and man struggled over the gun, but the officer managed to get a hold of it and shoot the suspect in the chest, Guadarama said.

"Somewhere in between, the officer even attempted to tase the suspect with negative results," Guadarama said. "The officer was able to grab the weapon back and fire one round at the suspect."

The suspect continued to fight until other officers arrived to help take him into custody.

The name of the officer -- a 5-year veteran -- has not been released. The officer suffered some scratches in the tussle and has been placed on administrative leave while the shooting is investigated.

The suspect's name also hasn't been released.