SAN FRANCISCO — Dozens of cooling centers opened throughout California, schools let students out early and outdoor events were cancelled as temperatures soared from a heat wave expected to last through the Labor Day weekend.

In normally cool and foggy San Francisco, temperatures reached an all-time high of 106 degrees Friday afternoon, well above the city’s 90-degree record set for this day in 1950 and the all-time record high of 103 degrees set in 2000.

Across the bay, Livermore will expected to reach 115 degrees (46 degrees Celsius), a temperature last seen in 1950, forecasters said.

The extreme heat sent project manager Michelle Ogburn to a cooling center set up in Santa Clara’s North Branch Library, where ice water stations were set up and dozens of people, many of them homeless, were taking shelter Friday afternoon.

“I work from home and I live in an old mobile home with no air conditioning and not very good insulation. Today it was very hot and I just couldn’t work,” said Ogburn, who lives in Sunnyvale, California.

Schools in the city of Orinda are closing early Friday and sports events in several high schools in the area were canceled or rescheduled.

The extreme heat and light wind combined with vehicle exhaust are prompting officials to ask Bay Area motorists to limit their driving to reduce pollution. Smoke from at least a dozen wildfires burning in Northern California is drifting into Bay Area skies and contributing to the unhealthy air.

Ogburn said a friend offered to let her borrow a portable air conditioner but she didn’t take up the offer.

“It’s too much energy to run it,” she said. “If it gets too hot over the weekend, I’ll leave the house and go to a movie.”

Managers of California’s power grid asked for voluntary electricity conservation as forecasters predicted more extreme heat statewide. An excessive heat advisory remains in effect through Monday night for interior valley and higher elevations in the Bay Area, the National Weather Service said.

The California Independent System Operator predicted demand on the system would set a record higher than the 50,270 megawatts on July 24, 2006.

Consumers were asked to cut back on use of electricity between 1 p.m. and 10 p.m. when use of air conditioners is at its peak.

A weeklong heat wave generated by high pressure over the West was nearing its peak, the National Weather Service said. People were urged to take precautions against heat-related illnesses — especially the elderly, infirm and children.

Inland areas north and east of San Francisco Bay were expected to bake in triple-digit heat of up to 115 degrees, and even the usually temperate coastline had 80s and 90s in the forecast. The region’s hills and mountains were under fire weather warnings.

The outlook was the same in Southern California as the region faced a combination of strong high pressure and weak onshore breezes from the Pacific Ocean to land.

“Dangerous heat across SoCal!,” the Los Angeles-area weather office website declared.

Southern California has also had lightning, thunder, downpours and localized street flooding fed by monsoonal moisture.

Forecasters said more could be expected when remnants of Tropical Storm Lidia move north from Mexico’s Baja California during the weekend.

Warnings of excessive heat also blanketed the 450-mile length of California’s central valley agricultural heartland and portions of the western slope of the Sierra Nevada.

The warmth extended up the West Coast, with excessive-heat warnings posted for southwest Oregon and lesser advisory-level conditions in northwest Oregon. Western Washington state expected a sunny, hot and dry Labor Day weekend.

Elsewhere in the West, fire weather warnings were in effect for parts of Montana, Wyoming and South Dakota.