A magnitude 5.1 earthquake shook southern California on Sunday afternoon as much of the region began to feel the effects of Tropical Storm Hilary.

The U.S. Geological Survey (USGS) said the earthquake’s epicenter was about four miles southeast of Ojai, California, about 80 miles northwest of Los Angeles.

According to the USGS, the magnitude 5.1 earthquake happened at 2:41 p.m. PT.

TROPICAL STORM HILLARY MAKES LANDFALL IN MEXICO, THREATENS FLOODING IN CALIFORNIA AMID STATE OF EMERGENCY

Several smaller aftershocks occurred after the earthquake, ranging from magnitude 2.6 to 4.0.

The city of Calabasas posted to X, the social media site formerly known as Twitter, that the earthquake was upgraded to a 5.1, though there were no reports of any damage.

HURRICANE HILARY: STATE OF EMERGENCY DECLARED IN CALIFORNIA AS MILLIONS BRACE FOR LIFE-THREATENING FLOODING

Just before the earthquake, residents reported getting an alert on their phone from the USGS Shake Alert system.

“Earthquake detected! Drop, cover, hold on. Protect yourself,” the alert read.

The alert came as Tropical Storm Hilary was centered less than 100 miles from San Diego, Fox Weather reported.

CLICK HERE TO GET THE FOX NEWS APP

Torrential rains are expected from the storm, which could trigger life-threatening flooding through Monday.