LOS ANGELES - A storm pounding California with record rain forced authorities in the San Joaquin Valley to order 2,000 residents to evacuate the farming community of McFarland because of major flooding. An estimated 400 to 500 homes were in danger, a Kern County spokesman said.

A sheriff's helicopter crew was looking for the source of the flooding, which could be coming from ditches and canals that supply water to farms, fire department spokesman Sean Collins said.

Two evacuation centers were set up, but it appeared only one would be needed for now.

Stormy weather has gripped California since late last week, triggering mostly minor flooding, mudslides, road closures, and power outages. Forecasters warned of worsening conditions Tuesday and Wednesday, as more storms bore down on the state and threatened to dump 5 to 10 inches more of rain.

In McFarland, several dozen people who voluntarily evacuated gathered in the gymnasium of a community center. Restless children ran around as families waited to see whether they would be able to return home.

"I woke up to sirens. I don't know what to expect," Andrea Castillo, 17, said.

Some places in McFarland had as much as three feet of water in the streets, but the town had so far contained the flooding, said Gary Farrell, general manager of the city's parks and recreation district. "We are in a holding pattern right now," he said.

Elsewhere, the California Highway Patrol reported two rain-related traffic deaths. A 3-year-old boy was ejected from an SUV that went out of control in heavy rain in the Fresno area, and a 22-year-old man was ejected from a vehicle that crashed in the Bakersfield area.

Virtually the entire state was affected by the bad weather. On Sunday, rainfall records for the date fell, traffic accidents snarled roads, and trees tumbled.

Some places in Southern California received more than 12 inches of rain, meteorologist Jamie Meier of the National Weather Service said. It was the most rainfall in one storm since 2005, he said. "That will make for a pretty good wallop, especially considering how dry things have been for the last two years," Meier said.

Flash-flood watches and warnings were in effect Monday in some places, particularly mountain areas still scarred by wildfires. Residents of La Canada Flintridge were among those keeping a wary eye on the rain after a 250-square-mile wildfire last year denuded slopes above communities along the foothills of the San Gabriel Mountains.

Pacific Gas & Electric Co. crews were working to restore power to the last of about 282,000 customers who lost electricity.