The quake jolted the Compaq Center in San Jose where the San Jose Sharks were playing the Colorado Avalanche in a National Hockey League playoff game.
The upper stands of the arena shook strongly for about 10 seconds and light fixtures continued to sway for several seconds afterward. The game continued uninterrupted, however.
"Everything was shaking," said Michel Goulet, vice president of player personnel for the Avalanche, who was sitting in the stadium's upper level. "You start thinking, 'Should I run or what?' I wasn't sure what to do."
The U.S. Geological Survey said the quake, which had a preliminary magnitude of 5.2, was centered about three miles southwest of the town of Gilroy, about 75 miles southeast of San Francisco - an area bisected by the San Andreas Fault. Of several aftershocks, the largest was a 2.5.
Julie Martinez, a geophysicist at the USGS National Earthquake Center in Golden, Colo., said the quake was officially classified as a moderate temblor - likely to be felt over a wide area but, in an area with relatively strict building codes like California, unlikely to cause much damage.
"This is about what you would expect with an earthquake like this in California," she said.
It felt like a sharp jolt to Danny Sharma, a manager at Rodeway Inn in Gilroy. He said the motel shook violently and knocked off coffee pots and glasses off of room counters.
"It was the worst one I've ever felt," Sharma said. "The whole building was shaking and there was just this rumbling sound. It was a bad quake."
While customers in nearby businesses ran outside for protection, no one appeared to be injured, Sharma said. Police in Gilroy said the quake didn't appear to cause any fires and they had no preliminary word of damage.
As a precaution, the Bay Area Rapid Transit system slowed trains and checked tracks for damage.
The quake caused a low rumbling in San Francisco, where it seemed to last for several seconds and get stronger as it went along.
"It was a pretty good swing," said a phone operator at the Hyatt Regency in San Francisco who was flooded with calls from guests worried about the shaking. "One guy on the 15th floor said his room just started swaying."
The quake also jolted Pacific Bell Park during a game between the Atlanta Braves and San Francisco Giants, but play was not interrupted.
Glass panes in the front of the press box rattled in the ninth inning with the Braves batting. There was no noticeable reaction from the players or the crowd of 36,331.
After the bottom of the ninth ended with the score tied, the stadium sound system played Jerry Lee Lewis' song "Whole Lotta Shakin' Goin' On."
"I was sitting upstairs and it was a good jolt," fan Jenny Hsin said. "At first I thought it was the guy behind me kicking my chair, then I looked and saw the whole row shaking with me. At one point I was going to turn around and tell him to stop. That's when I saw the whole row."
San Francisco's last major destructive temblor was the 1989 Loma Prieta earthquake, a magnitude 7.1 shake-up which killed 67 people and caused widespread damage, including bringing down part of the Oakland-San Francisco Bay Bridge.