The chase began at about 3:30 a.m. after an officer attempted to pull over a silver, four-door Honda Civic in the area of 10th and Gilman streets for a traffic violation, police spokesman Officer Andrew Frankel said.
The driver refused to yield and the officer followed the car. After about two blocks, near Ninth and Camelia streets, the officer heard a gunshot and called in a report of shots fired, Frankel said.
No one was hit by the gunfire and police continued to follow the Honda until the driver stopped in the middle of the road at Fifth and Camelia streets, Frankel said. Three males exited the car and ran.
Berkeley police, Albany police and a K-9 unit from Oakland searched the neighborhood and found the 17-year-old boy hiding in the 700 block of Page Street, Frankel said.
The other two suspects remained at large as of about 8 a.m.
Frankel said a handgun was recovered near Ninth and Camelia streets. He said the officer who initiated the pursuit didn't see a muzzle flash at the time the shot was fired and that investigators believe the gun went off by accident.
"What we think happened was that they were scared to get caught with a gun, they threw it out the window and it fired," Frankel said.
The 17-year-old was arrested and brought to the Berkeley Police Department and will be taken to juvenile hall, he said.