Twenty-nine years ago, the Loma Prieta earthquake rocked the Bay Area, killing 63. Apartment buildings in San Francisco crumbled and burst into flames.

The region is due for another major quake — potentially bigger than the 6.9 temblor that struck on Oct. 17, 1989 — with a 72 percent chance in the next 25 years, according to scientists.

The Bay Area’s hot economy could hurt rebuilding efforts. Already, North Bay residents trying to restore thousands of single-family homes after last October’s wildfires have encountered delays and high costs due to a shortage of construction workers.

Magnify that demand for labor exponentially if an earthquake devastates a city like San Francisco or Oakland, and delays could drag on for years or decades.

“If it’s a widespread disaster, we’re going to have serious issues,” said Alex Lantsberg, a researcher with the International Brotherhood of Electrical Workers, a construction union.

Demand for labor has made San Francisco the second-most expensive city to build in the world, behind only New York, according to construction consultant Turner & Townsend.

Construction crunch by the numbers

5% Rise in San Francisco’s construction cost in 2017

2 million

U.S. construction workers who left the industry during great recession

14,900 New Bay Area housing units built in 2017

Over $750,000

Construction cost for one San Francisco apartment in a new project

Sources: Turner & Townsend, Metropolitan Transportation Commission, Association of Bay Area Governments, California Employment Development Department, Chronicle research

The post-wildfire reconstruction in Sonoma County offers a cautionary tale. Demand for labor has risen throughout the year in Santa Rosa’s hard-hit Coffey Park neighborhood, said Dan Bradford, owner of the first home to be rebuilt after the fires.

Bradford’s new $435,000 home was rebuilt in just five months, and he moved back in May. His insurance covered the full cost of rebuilding. But now, with around 500 homes in various stages of construction, his neighbors are competing for a shrinking pool of workers. It can take more than a year to rebuild a single home.

“The time frame keeps getting pushed back,” said Bradford. “There’s a lot of delays.”

Bradford hired Lake County Contractors, which is struggling to find enough workers.

“For every 10 we hire, we might keep one,” said Mark Mitchell, owner of the firm, which is building 14 single-family homes in fire-ravaged areas around Northern California.

Mitchell said the workers he finds show up late to job sites or don’t have adequate training. It’s particularly hard, he said, to find lead foremen who can “run a crew.”

“There’s many worker bees out there, but there aren’t many queens,” he said.

Lake County Contractors pays entry-level workers lower wages — roughly $16 to $18 per hour — than more experienced ones. But a single home takes longer to rebuild with untested workers, keeping costs high.

In Coffey Park, construction costs range from $285 to $450 per square foot, or more than $500,000 for a typical house, according to Mitchell.

Mitchell, 52, has been working in construction since he was a teenager. He said it’s currently “the tightest labor market I’ve seen.” Many construction workers left the industry after the recession a decade ago, he said.

One piece of good news for Wine Country and the suburban parts of the Bay Area: A big earthquake typically doesn’t do major damage to single-family homes, according to Mitchell. It might break windows or damage infrastructure, but the risk for damage is higher in older, larger apartment buildings.

“The oldest urban areas are the places that are going to be hit the hardest,” Mitchell said.

San Francisco is preparing. In 2013, it mandated seismic retrofits of wood-frame residential buildings with five or more units that had building permits filed before 1978. The city requires owners of buildings with a “soft story” ground floor — such as a retail space or garage — to reinforce walls and floors to make them safer.

“You’re seeing a much more robust building code” compared with 1989, said Bill Barnes, a spokesman for the city administrator’s office.

This month, the city released a report that urged inspections of 50 to 65 downtown towers that may be vulnerable in the next quake. The buildings are primarily office buildings, but a fifth are residential.

State building codes require buildings to have a 90 percent chance of avoiding a collapse in a major earthquake. But a structure may not be habitable after an earthquake even if it doesn’t collapse.

San Francisco has one advantage compared with the surrounding region: Hourly construction wages are about $4 higher than in Oakland and San Jose, which should lead to more workers in the city, according to Lantsberg of the International Brotherhood of Electrical Workers.

The 1906 earthquake was an economic boon for the city as businesses rushed to rebuild taller and larger buildings. The 1989 quake had a mild effect on the economy, according to a 1991 report by the Association of Bay Area Governments, with 7,100 layoffs in a region with 3 million jobs and a 0.1 to 0.4 percent reduction in regional gross domestic product. It resulted in $5.9 billion in physical damage.

The 1989 quake particularly impacted transportation and power infrastructure, including the Bay Bridge, according to the Association of Bay Area Governments.

If streets, power, sewer and telecommunications lines need fixing, even fewer workers could be available to repair and rebuild housing.

Public works and office projects currently command 30 percent higher wages than housing construction, said Scott Littlehale, a senior research analyst for the Northern California Carpenters Regional Council, a construction union.

The labor gap will take years if not decades to fill, he said. Currently, there are about 24,000 trained carpenters in Northern California, down from 36,000 in 2005, according to Littlehale.

“I just think the construction model is broken for residential construction,” he said. “The residential sector’s reeling from the fact that workers can find a better job.”

Roland Li is a San Francisco Chronicle staff writer. Email: roland.li@sfchronicle.com Twitter: @rolandlisf