SAN JOSE — A petty theft suspect who allegedly forced his way into three occupied homes and held one woman at knifepoint while running from officers was captured after a 10-hour standoff Wednesday.

The episode began with an 8:50 a.m. report that a man had stolen merchandise from an O’Reilly auto parts store on the 1900 block of Tully Road and fled, jumping fences toward the neighborhood on the north side of Tully, according to San Jose police.

The suspect broke into three occupied homes on the 1800 block of Clarice Drive in an attempt to elude officers and used a knife to keep one woman from leaving, according to police. The victim told police the suspect mentioned having a gun, but one wasn’t seen.

Residents in the surrounding homes were evacuated as a precaution while police negotiators worked to coax the suspect into surrendering peacefully. Officers finally entered the home where he was holed up around 6:50 p.m. and took him into custody.

The suspect was injured during the arrest, according to police. He was not identified but police said he would be booked into the Main Jail in San Jose after being treated at a hospital.

There were no immediate reports of any other injuries.

Police said a second suspect, a female, also was arrested near the auto parts store and booked for burglary.