SAN DIEGO — A San Diego police officer who was wounded in a shooting earlier this week has been released from the hospital, the department said Wednesday.

“I am happy to report our injured officer has been released from the hospital and is recovering at home with his family,” Lt. Adam Sharki said in an emailed statement Wednesday afternoon.

The officer was shot following a vehicle pursuit that came to an end when the suspect abandoned the stolen car near 45th Street and Logan Avenue in Mountain View, police said. Officers then chased the suspect, who opened fire, striking one officer.

Officers performed life-saving measures on the wounded officer and took him to a local hospital, where he underwent surgery.

Police have not released the name of the wounded officer, but said he has been with the department for a year and a half.

The suspect then barricaded himself near an apartment complex in the 1000 block of South 44th Street, according to police. A SWAT team was in a standoff with the suspect for more than 9 hours until around around 10:30 a.m. Police said they detained the suspect after determining he was overdosing inside the building. Officers then went inside the home and administered Narcan to save the man’s life.

The suspect, 21-year-old Andrew Garcia of San Diego, was booked into jail on several charges, including one count of attempted murder of a police officer, felony evading, auto theft, reckless discharge of a firearm into an inhabited dwelling and for being a felon in possession of a firearm.