CAMPBELL — A drug-addled man suspected of firing wayward shots while being chased by police was arrested early Thursday morning near Los Gatos Creek.

No one was hit during the lengthy encounter, which began unfolding around 11:40 p.m. Wednesday when Campbell police responded to reports of a prowler near a home in the 700 block of Cypress Lane. Multiple calls to 911 also reported explosions outside.

When officers arrived, they saw someone in a side yard near the Highway 17 sound wall. That person ran from officers and jumped a fence into the backyard of another home, followed shortly after by sounds of gunfire.

The officers called for assistance from San Jose and Los Gatos police, the Sunnyvale Department of Public Safety, the Santa Clara County Sheriff’s Office and the California Highway Patrol, Campbell police Capt. Gary Berg said. Campbell police surrounded the area and summoned their tactical team.

“We don’t want our officers jumping the fence and getting into an ambush situation,” Berg said.

No officers or civilians were hit by any of the gunshots, but an additional eight to 12 shots were heard over the next 10 to 15 minutes as officers took tactical positions around the site, police said. Neighborhood residents were ordered to shelter in place, and the CHP closed southbound Highway 17 from Hamilton Avenue to San Tomas Expressway.

Eventually, CHP officers spotted a man matching the suspect description lying face down near Los Gatos Creek. The man lay there for at least an hour, not moving or responding to police commands, Berg said.

Eventually the man got up, obeyed their orders and was taken into custody around 1:14 a.m. Thursday.

Police found a gun near where the man was lying down, Berg said. Shell casings were also located near the home where the explosions were heard and where the shots were fired, and at least one bullet was found lodged in a nearby residence.

The suspect was later identified as Daniel Tanner, a 35-year-old transient, police said. He was booked into the Santa Clara County Main Jail on suspicion of an array of crimes including shooting at an inhabited or occupied dwelling and being under the influence of a controlled substance.

Staff writer Robert Salonga contributed to this report.