A carjacking suspect stole a police car and led officers on a chase Tuesday night before they corralled the vehicle and arrested him on suspicion of numerous earlier felonies spanning two counties.

Edgar Allen James III, 32, of Castro Valley, began a binge of carjackings and home-invasion robberies in El Cerrito and Kensington that morning, police said.

He eluded arrest and moved on to Martinez about midday, before carjacking a vehicle to escape police there and driving it to Vacaville, where he stole a Toyota Camry, Richmond police Lt. Bisa French said. Police found the Camry about 8 p.m. in the Belding Woods neighborhood in Richmond after acting on a tip that James was hiding in a house in the 700 block of 18th Street.

“He jumped into a patrol car and led us on a chase around the city,” French said. “An officer did fire two shots at him.”

As police massed around the house where they believed James hid, a man ran out the back of the house and began jumping over backyard fences. Believing he was James, some of the officers began chasing on foot.

Soon thereafter, James left the house, got into a nearby patrol car and drove away. An officer shot into the patrol car but did not hit James, French said.

The chase led east across Richmond before an officer rammed the runaway patrol car to box it into Reid Court in south Richmond. Officers fought with James trying to arrest him, and used Tasers to subdue him, French said.

No police officers were injured; James went to the hospital for treatment of minor injuries.

The first signs of James’ suspected spree surfaced just after 9 a.m. Tuesday after an El Cerrito resident reported fending off a backyard prowler who rang his doorbell and asked to enter. But the man fled after the homeowner called police. While El Cerrito police searched for the suspect on Baron Court, he kicked down the door of a house on King Drive and attacked a resident, leaving her with minor injuries, Lt. Paul Keith said.

The same suspect was then seen in a car stolen from a nearby house, and he later carjacked someone in neighboring Kensington, where El Cerrito police got help from joggers and dog-walkers to keep up with the suspect as he traversed the hills on narrow, winding streets to elude capture.

“The fact that no one was seriously hurt is just a godsend,” Keith said.

At one point, Keith and another officer looking for the carjacked vehicle needed to pull abruptly off Arlington Boulevard as it charged toward them, driving on the left side of the street. The suspect escaped by driving onto a fire trail at the top of the Hillside Natural Area and exiting at the bottom.

James reportedly then drove to Martinez, where he abandoned the car in a driveway on Donaleen Court around 12:45 p.m. and entered a home where he robbed a resident of $200 by threatening him with a revolver. James then went to a car in the driveway of the same home, told the driver to get out and took off.

Just before 2 p.m., James re-emerged in Vacaville, where he abandoned his latest ride and entered a home on Somerville Drive through a partially open garage, said Vacaville Sgt. Chris Polen. He rifled through the home looking for car keys when he was confronted by an elderly female resident, from whom he demanded car keys. She refused, but he eventually found keys to the Toyota Camry that he drove to Richmond.

El Cerrito police had arrested James on suspicion of a home-invasion robbery in November, but the District Attorney’s Office declined to file charges due to lack of evidence, Lt. Keith said. But similarities in both suspect description and methods helped detectives focus on James soon after he escaped the city, Keith said.

Contra Costa County court records show four felony convictions for James between 1998 and 2002 covering burglary, auto theft, drug and weapons offenses. Records also show a pending 2002 case detailing 10 felonies including assaulting an officer, burglary, carjacking and auto theft, but neither prosecutors nor the clerk’s office had information on the status of those charges Wednesday.