SAN DIEGO — Charges were filed Wednesday against a man accused of shooting a San Diego police officer and then barricading himself inside a Mountain View home, leading to a nine-hour standoff.

Andrew Garcia, 21, pleaded not guilty to charges of attempted murder of a peace officer, assault with a semi-automatic weapon on a peace officer, shooting at an occupied home, reckless evading, vehicle theft and being a felon in possession of a firearm.

The shooting happened Monday after police received reports of a stolen car near Naval Base San Diego. After a short chase, Garcia got out of the car and ran off before opening fire, police said.

The wounded officer was released from the hospital and was recovering at home, SDPD said in an emailed statement Wednesday.

If convicted on all charges, Garcia faces 43 years to life in prison.