The USGS says the earthquake hit about 4 miles southeast of Ojai, California, located northwest of Los Angeles.
Many in Southern California felt the earthquake, reporting the shaking just before 3 p.m. PT.
The earthquake hits just as Tropical Storm Hilary approached the area.
Many on social media have labeled the two instances as "hurriquake."
Some residents reported receiving an alert on their phones in the moments before the earthquake.
The alert message stated: "Earthquake detected! Drop, cover, hold on. Protect yourself. -USGS ShakeAlert."
At least a dozen aftershocks with several above 3.0 magnitude were reported after the initial quake
At last update, the tropical storm was less than 100 miles from San Diego.
"There is no pattern in California of large, damaging earthquakes occurring more frequently during periods of heavy precipitation or periods of drought. Therefore, it’s unlikely that seismic hazard is affected by precipitation," the USGS said. "However, periods of heavy precipitation or of drought might indirectly affect earthquake-prone faults."
Hilary continues to bring torrential rain with potentially life-threatening flooding through at least Monday.
The U.S. National Earthquake Information Center reports that 12,000-14,000 earthquakes occur annually. Usually, California experiences two or three earthquakes large enough to cause damage to buildings.