The 6.4 magnitude quake struck at 10:33 am in the Mojave Desert, about 240 kilometres northeast of Los Angeles, near the town of Ridgecrest, California.
Some people were hit by falling objects and two house fires were reported in the town of 28,000.
Kern County Fire Chief David Witt said 15 patients were evacuated from the Ridgecrest Regional Hospital as a precaution because of some structural issues.
Ridgecrest Mayor Peggy Breeden said that utility workers were assessing broken gas lines and turning off gas where necessary.
The local senior centre was holding a July 4th event when the quake hit and everyone made it out shaken up but without injuries, she said.
“Oh, my goodness, there’s another one right now,” Breeden said on live television as an aftershock struck.
Governor Gavin Newsom declared a state of emergency for Kern County. The declaration means that the state will help the county and municipalities in it with emergency aid and recovery efforts.
California Highway Patrol Lt. John Williams says officials have found cracks on several roads in the county, but overpasses and underpasses are in good shape.
A series of aftershocks included a 4.5 magnitude tremor, according to the United States Geological Survey.
Lucy Jones, a seismologist with the California Institute of Technology’s seismology lab, said the earthquake was the strongest since a 7.1 quake struck in the area on October 16, 1999.
Jones said vigorous aftershocks were occurring but that they were striking in a remote sparsely populated area.
People from Las Vegas to the Pacific Coast reported feeling a rolling motion and took to social media to report it.
Glenn Pomeroy, the head of California’s Earthquake Authority, said the earthquake is “an important reminder that all of California is earthquake country.”