SACRAMENTO, Calif. (AP) — While California’s economy is booming, a new analysis shows pension obligations continue to weigh on the state’s cities as nearly three-quarters of them don’t have enough money to pay the future health benefits for retired workers.

State Auditor Elaine Howle ranked the financial condition of 471 California cities on Thursday, with Compton topping the list for local governments labeled “fiscally challenged.” More than half of the cities were listed as moderate to high risk for financial problems.

The cities’ struggles contrast with California’s overall economy, now in its 115th month of growth, breaking a record set in the 1960s. Unemployment is at historic lows and the state has so much tax revenue that the Legislature approved a budget earlier this year with a $21.5 billion surplus.

Howle said 337 out of 471 cities have not saved enough money to pay for future retiree health benefits. Nearly half of the cities are not saving enough money to pay pension benefits in five years. She also said she was alarmed to see some cities borrowing money to pay for pension obligations.

“Right now, we’re in strong economic times, but everybody is expecting that recession to hit,” Howle said. “So hopefully this information will trigger some discussions and decision-making that better prepare cities to be able to respond to that recession, without cutting services.”

The auditor’s office used 10 indicators to measure cities’ financial health, including whether they had enough money to pay their bills, how much debt they have how much money they have in savings and if the city has enough money to pay retirement obligations. The office used those indicators to score cities in a ranking from worst to best.

The rankings are displayed on the auditor’s website, which Howle hailed as the first of its kind in the nation to show such a level of detail about city finances. But the League of California Cities characterized the analysis as a data dump without context and analysis, making the rankings “irresponsible and misleading.”

“There is not a one-size-fits-all template on how to run a city’s finances,” said Jill Oviatt, director of communications and marketing for the league. She noted the data was from 2017, and many cities have since approved new taxes and other measures to improve their finances.

Howle said 2017 was the latest year most of the cities had audited financial statements available.

Overall, the auditor identified 18 cities that are “fiscally challenged.” Half of them were in and around Los Angeles County. Compton was No. 1, listed as “high risk” for all ten indicators. Howle said the city was in the worst shape because, despite being required by law, it does not publish audited financial statements.

A spokeswoman for the city did not return calls or an email seeking comment.

Compton was followed by the cities of Atwater in the Central Valley, Blythe on the border of Arizona, Lindsay — about 60 miles (95 kilometers) north of Bakersfield — and Calexico, a small city on the U.S.-Mexican border.

Most of the 18 “high-risk” cities had fewer than 100,000 people. The biggest troubled city was Oakland, with more than 400,000 people at No. 13. Oakland City Administrator Sabrina Landreth called the analysis “a blunt tool that doesn’t account for each jurisdiction’s unique and complex financial situation.”

“That said, it does highlight the challenges many California cities, including Oakland, are facing related to pension obligations and retiree medical benefits,” Landreth said.

She said the city has made several changes since 2017, including boosting reserves and approving a budget that “makes an ongoing commitment to pay down the City’s unfunded medical liabilities for retirees.”