Click HERE if you’re having trouble viewing the gallery on your mobile device.

SAN JOSE — Police shot at, but did not hit, an armed home-invasion suspect before arresting him near a downtown apartment complex early Sunday, authorities said.

No officers were injured in the confrontation near East William and South Ninth streets that occurred around 7 a.m., according to San Jose police.

Officers were called to an apartment complex in the area for reports describing an active home-invasion robbery by two male suspects in one of the units, Sgt. Stewart Davies said.

“We showed up and they fled. We contained them in a perimeter,” Davies said.

One of the suspects — a juvenile — was arrested almost immediately, and the other suspect was soon cornered in a back lot, police said.

“(He) had a gun and didn’t obey commands. We shot at him and missed; he didn’t get hit,” Davies said. “He didn’t shoot at us.”

Police recovered a gun afterward, Davies said.

The suspect did suffer an unrelated injury — a possible ankle sprain — and was transported to a local hospital for treatment, police said.

Related Articles Man fleeing San Jose police jumps into barrel of taco grease Additional details about the case were not immediately available. A heavy police presence remained in the area throughout Sunday morning.

The incident marked SJPD’s third officer-involved shooting of the year, one of them being fatal.

Check back later for updates to this story.