A routine police stop in West Oakland erupted into gunfire when someone with a rifle opened fire from a high-rise building, police said Monday.

No one was struck by the gunfire, and a search of the area failed to turn up the shooter, said Officer Jeff Thomason, a police spokesman.

The incident began when an officer pulled a car over on the 1000 block of Eighth Street at 11:17 p.m. Sunday, Thomason said. Police found crack cocaine in the vehicle, authorities said.

During the car stop, someone opened fire with a rifle, Thomason said. The officer called for emergency backup, and police swarmed the area.

Police determined that the shooter had been firing from a high-rise building at 1055 Eighth St., which is part of the City Towers housing complex, authorities said. Many units in the building are Section 8 government-subsidized housing.

Officers searched the area by foot and with a helicopter but could not find the shooter, Thomason said.