The U.S. Geological Survey said the quake struck at about 9:09 p.m. Friday and was centered near Brea in Orange County - about 20 miles southeast of downtown Los Angeles - at a depth of about 5 miles. It was felt as far south as San Diego and as far north as Ventura County, according to citizen responses collected online by the USGS.
Broken glass, gas leaks, water main breaks and a rockslide were reported near the epicenter, according to Twitter updates from local authorities.
Eyewitness photos and videos show bottles and packages strewn on store floors. Southern California Edison reported power outages to about 2,000 customers following the quake.
More than two dozen aftershocks ranging from magnitudes 2 to 3.6 were recorded, according to the USGS. Earlier in the evening, two foreshocks registering at magnitude-3.6 and magnitude-2.1 hit nearby in the city of La Habra.
Public safety officials said crews were inspecting bridges, dams, rail tracks and other infrastructure systems for signs of damage. The Brea police department said the rock slide in the Carbon Canyon area caused a car to overturn, and the people inside the car sustained minor injuries.
Callers to KNX-AM reported seeing a brick wall collapse, water sloshing in a swimming pool and wires and trees swaying back and forth. One caller said he was in a movie theater lobby in Brea when the quake struck.
"A lot of the glass in the place shook like crazy," he said. "It started like a roll and then it started shaking like crazy. Everybody ran outside, hugging each other in the streets."
A helicopter news reporter from KNBC-TV reported from above that rides at Disneyland in Anaheim - several miles from the epicenter - were stopped as a precaution.
Hall of Fame announcer Vin Scully was on the air calling the Angels-Dodgers exhibition game in the sixth inning at Dodger Stadium.
"A little tremor here in the ballpark. I'm not sure if the folks felt it, but we certainly felt it here in press box row," Scully said. "A tremor and only that, thank goodness."
Tom Connolly, a Boeing employee who lives in La Mirada, the next town over from La Habra, said the magnitude-5.1 quake lasted about 30 seconds.
"We felt a really good jolt. It was a long rumble and it just didn't feel like it would end," he told The Associated Press by phone. "Right in the beginning it shook really hard, so it was a little unnerving. People got quiet and started bracing themselves by holding on to each other. It was a little scary."
Friday's quake hit a week after a pre-dawn magnitude-4.4 quake centered in the San Fernando Valley rattled a swath of Southern California. That jolt shook buildings and rattled nerves, but did not cause significant damage.
Southern California has not experienced a devastating earthquake since the 1994 magnitude-6.7 Northridge quake killed several dozen people and caused $25 billion in damage.
Preliminary data suggest Friday night's 5.1 magnitude earthquake occurred near the Puente Hills thrust fault, which stretches from the San Gabriel Valley to downtown Los Angeles and caused the 1987 Whittier Narrows earthquake, USGS seismologist Lucy Jones said.
"It's a place where we've had a lot of earthquakes in the past," she said.
The 5.9 Whittier Narrows quake killed eight people and caused $360 million in damage.
AP sports reporter Beth Harris contributed to this report from Buena Park, Calif.