Heavy rains lashed California on Sunday as Tropical Storm Hilary raced in from Mexico, bringing warnings of potentially life-threatening flooding in the typically arid southwestern United States.

With people already on edge, nature struck in another scary way: a 5.1 magnitude earthquake hit near the southern California town of Ojai but there were no immediate reports of damage or casualties.

As of Sunday afternoon Hilary's core was in California packing maximum sustained winds of 60 miles (95 kilometers) per hour, after barreling up Mexico's Baja California Peninsula, the US National Hurricane Center (NHC) said of this tropical weather event which was very rare for southern California. The storm was moving at the brisk pace of 23 mph (37 kph).

"Catastrophic and life-threatening flooding likely over Baja California and portions of the southwestern US through Monday," it warned.

"This is an unprecedented weather event," Los Angeles Mayor Karen Bass warned.

Beaches were ordered closed and people rushed to stores to stock up on water and other essentials. Flash flood and even tornado warnings were issued for some areas.

Hilary earlier reached Category 4 – the second-most powerful on the five-step Saffir-Simpson hurricane scale – but was downgraded to a tropical storm as it headed towards the densely populated Mexican border city of Tijuana.

Despite the weakening, US Federal Emergency Management Agency (FEMA) administrator Deanne Criswell urged people to take the dangers seriously.

"Hurricane Hilary is going to be a serious impact and threat to southern California," she said on CNN.

California Governor Gavin Newsom declared a state of emergency for much of the state's southern area.

"Stay safe, California," he wrote on social media as Hilary approached.

Authorities opened five storm shelters and deployed more than 7,500 personnel, including several hundred National Guard soldiers as well as swiftwater rescue teams, Newsom's office said.

In San Diego, people filled sandbags to prepare for possible flooding, while lifeguards warned people to stay out of the sea.

'Very, very dangerous'

One person died in Mexico after a vehicle was swept away by a swollen river, Mexico's Civil Protection agency said, while warning of landslides and road closures in Baja California.

The Mexican army opened 35 shelters providing refuge to 1,725 people affected by the storm.

Hilary was expected to deposit up to 10 inches (25 centimeters) of rain on parts of California and Nevada, "leading to dangerous to catastrophic flooding," according to the NHC.

Some areas in Oregon and Idaho were also expected to see heavy rain and possible flash flooding, it said.

Tornadoes were possible in southeast California, western Arizona, southern Nevada, and far southwest Utah, it said.

Nancy Ward, director of the California Governor's Office of Emergency Services, said Hilary could be one of the worst storms to hit the state in more than a decade.

"Make no mistake," she told a press conference Saturday. "This is a very, very dangerous and significant storm."

Major League Baseball and Major League Soccer rescheduled games planned for Sunday in the US region.

The Mexican government deployed almost 19,000 soldiers in the states most affected by the storm, while the federal electric utility sent 800 workers and hundreds of vehicles to respond to any outages.

Hurricanes hit Mexico every year on both its Pacific and Atlantic coasts. Although the storms sometimes affect California, it is rare for them to strike the state with much intensity.

Scientists have warned that storms are becoming more powerful as the world gets warmer with climate change.

"We have to also look at what is the change in the climate doing to these severe weather events," Criswell, the FEMA administrator, told CNN Sunday. "What is the risk going to look like into the future."

© Agence France-Presse