It’ll be a race against the rain for Halloween trick-or-treaters Monday night in the Bay Area, and the little ghosts and goblins in the South Bay will have the best chance of winning.

“The timing is unfortunate,” said Golden Gate Weather Services meteorologist Jan Null, “especially in the northern two-thirds of the Bay Area.”

On the heels of a storm that delivered brief bursts of heavy rain Sunday throughout much of the region, a weak system is expected to sweep down Monday from the Gulf of Alaska. The storm will begin soaking streets and costumed children between 3 and 5 p.m. in places like San Francisco and Berkeley, Null said.

Rain will then spread southward, all the way to San Jose, Null said.

“Toward the South Bay, if I still had little ones, I’d be taking them out as early as I could,” he said. “San Jose, if you took them out between 6 and 7, probably you’re going to be dry, except for maybe a stray shower.”

The good news for the candy-crazed hordes will be relatively mild temperatures. Monday afternoon will see Bay Area temperatures in the low- to mid-60s, dropping into the upper 50s starting around 5 p.m., with minimal wind, Null said.

Trick-or-treaters should take safety measures, including carrying flashlights and wearing reflective clothing, to ensure they’re visible, and parents should hold hands with children while crossing streets, said California Highway Patrol Officer Ross Lee. “Even in crosswalks some traffic may not see you,” Lee warned.

Monday’s rain will close out an unusually wet October. On Sunday, the month’s penultimate storm created hazardous driving conditions and flooded roads. The system from the Gulf of Alaska dumped heavy rain in parts of the Peninsula and East Bay while moving quickly through the area, National Weather Service meteorologist Ryan Walbrun said.

By late Sunday afternoon, 24-hour rainfall totals hit three-quarters of an inch in Oakland, just over half an inch in Concord, below a half-inch at San Francisco International Airport and less than a fifth of an inch in San Jose. The Santa Cruz Mountains got roughly 1 inch.

The CHP recorded 21 accidents on the Peninsula between 6 a.m. and 5:30 p.m. Sunday. “Most of them were spinouts,” said CHP Officer Art Montiel. “This is just mainly caused by people not slowing down and not taking into account that the roadway’s wet.”

An RV coming eastbound down twisty Highway 92 below Skyline Boulevard crossed the double yellow and struck an Audi head-on, leaving the car’s driver with minor injuries, Montiel said. On Interstate 280, a single-vehicle rollover north of Bunker Hill Drive caused minor injuries to the driver, he said.

A four-car crash on westbound Highway 4 near Bailey Road around 11:30 a.m. blocked two lanes of traffic. A two-car crash on westbound Interstate 580 near the Interstate 238 interchange also tied up traffic.

It was not known immediately whether anyone suffered serious injuries in those wrecks.

Montiel advised drivers of newer vehicles to manually turn on their headlights during daytime rains, as the lights may not come on automatically.

The stormy weather led to power outages, with PG&E recording 37 in the Bay Area on Sunday, affecting 395 customers.

The storm also brought snow to the Sierra Nevada. A quarter-inch fell in South Lake Tahoe on Sunday morning. The National Weather Service predicted possible rain and snow in South Lake Tahoe on Monday morning before 11 a.m. Starting Monday evening and overnight, a few inches of snow will likely fall around Lake Tahoe, Null said. “It’ll be enough to complicate travel over the mountains,” he said.

Bay Area precipitation in October — about 2.5 inches in San Francisco, for example — has been about twice the normal amount, but October rainfall is not a predictor of precipitation for the winter, Null said.