SAN FRANCISCO - A small earthquake hit the San Francisco area on Thursday afternoon, causing a sharp jolt on the same day Californians took part in an annual earthquake preparedness drill.

The quake, with a preliminary 4.0 magnitude, struck at 2:31 p.m. and was centred across the bay from San Francisco, about two miles (3.2 kilometres) southeast of Berkeley.

Jack Boatwright, a seismologist with the U.S. Geological Survey, described it as a "sharp little earthquake" that had a "very nice impulsive character."

San Francisco police and officials at University of California, Berkeley, said they had no immediate reports of injuries or damage.

Tami Humphrey, director of a preschool just north of Berkeley, was outside with her students when the quake struck.

"We felt it pretty good. It felt like a drop and then a shake," she said, adding: "The kids didn't even notice."

More than 8 1/2 million people signed up to participate in the preparedness drill, which took place at 10:20 a.m. and was labeled the Great California ShakeOut.

The quake also came almost 22 years to the day after the Loma Prieta earthquake struck the Bay area during the 1989 World Series. The magnitude-6.9 quake killed 63 people, injured almost 3,800 and caused up to $10 billion damage.

Seattle resident Joaquin Miller was in Oakland when Thursday's shaking began. He said he first thought it was coming from a passing big rig.

"It wasn't big enough to scare me," the 44-year-old said.

Officials at Bay Area Rapid Transit said the system's trains were delayed about 15 minutes as workers inspected tracks. Officials at Caltrain said none of their trains were delayed.