There were no immediate reports of injuries in the Los Angeles area, which is about 125 miles south west of Ridgecrest.
The Kern County Fire Department said it is sending search and rescue teams to the town of 28,000 people.
The quake, measured with a preliminary magnitude of 6.4, struck on Thursday morning in the Mojave Desert.
People from Las Vegas to the Pacific Coast reported feeling a rolling motion that shook shower doors and made hanging dining room lights sway.
Agencies took to social media to ask people to only call 911 for emergencies.
“We are very much aware of the significant earthquake that just occurred in Southern California. Please DO NOT call 9-1-1 unless there are injuries or other dangerous conditions. Don’t call for questions please,” the LAPD said in a statement published on Twitter.
Ashleigh Chandler, a helicopter rescue worker at Fort Irwin, California, said the quake happened as she was getting ready for a July 4 party.
“I was just in the living room getting everything ready, we start to feel the shaking, so then I look up and then the wine bottles start rattling and I thought, ‘They’re going to fall’.
“My stepson was in the house and my dog, so we just got everyone outside and then it ended. It was like 15, 20 seconds, maybe. It was pretty good shaking, so I’m out of breath.”
Veteran seismologist Lucy Jones said the earthquake was the strongest to hit southern California in 20 years.
She said a 7.1 quake struck in the area on October 16 1999.
“It almost gave me a heart attack,” said Cora Burke, a waitress at Midway Cafe in Ridgecrest, a town of 28,000 people.
“It’s just a rolling feeling inside the building, inside the cafe and all of a sudden everything started falling off the shelf, glasses, the refrigerator and everything in the small refrigerator fell over.”