Southern California welcomes cooler temperatures and spotty rain as a tropical storm veers off the Pacific Coast, helping put an end to a blistering heatwave that nearly overwhelmed the US state's electrical grid.

People run over the sand berms to the water after a tropical storm in Long Beach, California.
People run over the sand berms to the water after a tropical storm in Long Beach, California. (AP)

A tropical storm off the Pacific Coast has brought cooler temperatures and much needed rain to Southern California, ending a scorching heatwave and easing fears that a massive wildfire could threaten more residents.

Officials had warned that high winds from the remnants of Tropical Storm Kay could fan the flames of the Fairview Fire, which as of Friday had consumed nearly 11,000 hectares in Riverside County, east of Los Angeles, and was only 5 percent contained. 

Heavy rain from the storm on Saturday, meanwhile, raised the possibility of flash flooding and mudslides.

But steady rain helped firefighters make significant progress overnight, according to Rob Roseer, a spokesperson for Cal Fire, the state's firefighting agency. 

As of 10:50 am (1750 GMT), the fire was 40 percent contained, and there were no reports of flash flooding or debris flows, Roseer said.

"Thankfully, the rain from Tropical Storm Kay came through earlier than expected and provided a lot of relief for firefighters," he said.

READ MORE: Firefighters brace for mudslides as storm barrels into California burn area

Expanding Mosquito Fire

Thousands of residents have been ordered to leave their homes, though some people who live west and northwest of the fire have been allowed to return since Friday, Roseer said. Two people have died as a result of the fire.

The Mosquito Fire east of the state capital of Sacramento continued expanding overnight, however. As of Saturday morning, the blaze had burned through more than 13,000 hectares and was 0 percent contained, Cal Fire said.

Highs in southern California were mostly expected to stay under 32 degrees Celsius, according to forecasters, after days of oppressive heat across much of the state. Temperatures hit a record 101 degrees at Los Angeles International Airport on Friday, the National Weather Service said.

Officials had considered implementing rolling electricity outages earlier in the week, when power demand hit an all-time high.

READ MORE: California firefighters struggle as wildfire doubles in size

Source: Reuters