There's a phrase economists often say: If you want to see the economy improve, go shopping. That often seems like a rationale to embark on a self-indulgent shopping spree. But in the case of new car sales, it really did ring true last year.

Take Petaluma. That city brought in enough money last year from the sales tax on new cars to pay for its entire parks and recreation department, and still had a little left over.

A sharp increase in car sales across Sonoma County has sent a surge of tax revenue to local government agencies, while prompting local dealers to begin hiring again.

New car sales in Sonoma County jumped 27 percent in 2012, giving dealers their best results in five years, according to AutoCount data from Experian Automotive.

Statewide growth of new car sales also was strong. The number of new vehicles sold in California rose 25.3 percent, well above the 13.4 percent increase nationwide, according to the California New Car Dealers Association.

Auto executives attribute the increase in sales to the release of pent-up demand, strong trade-in values and easing credit conditions.

"We averaged a 40 percent increase in year-over-year sales, with a real acceleration in the last quarter," said Henry Hansel, owner of six auto dealerships selling 11 brands in Santa Rosa and Petaluma. "The whole industry, but in particular Northern California, seems to be performing better."

Toyota brands dominated sales statewide, capturing 21 percent of the market, followed by Honda with 12.5 percent and Ford with 11.3 percent.

Those gains make a substantial impact on the local economy. But the totals are still far below pre-recession levels. Sonoma County auto dealers sold 15,313 new cars last year, just two-thirds of the volume reached in 2005, according to AutoCount.

"New car sales is a large portion of our sales tax," said Bill Mushallo, finance director for Petaluma. "It's about 19 percent of our sales tax revenue, so it's been a significant impact here at the city over the last couple of years."

In Petaluma, sales tax revenue from new car dealers, which also includes revenue from those dealers' used car sales, reached $1.7 million in the fiscal year that ended June 30, Mushallo said, a welcome revenue stream in a city where the general fund budget fell from $48 million to $32.5 million in recent years.

"Last fiscal year generated a bit of a surplus because of the increased sales tax," Mushallo said. "We have very minimal reserves."

The increased sales also provide a boost to the local job market.

At its peak in 2006, Hansel Auto Group employed nearly 700 people. But when the recession hit — and statewide new car sales fell from an average of 2 million cars per year to just 1 million in 2009 — staffing at the auto group fell to about 425 people, Hansel said.

"It was painful," Hansel said. "It was truly survival mode. So it was a combination of layoffs, and a combination of people realizing that they weren't able to make enough income with reduced sales."

Car sales began picking up in late 2011, and so did hiring. The company now employs 500 people and plans to expand its workforce by an additional 10 percent this year, Hansel said.

Sales consultant John Knapp started at the Hansel Toyota dealership in Petaluma in November, after a previous career working as a press operator for the San Francisco Chronicle.

"It's a big deal," Knapp said about the job. "I've always been able to talk to anybody, and I was able to carry that over to this job," he said, before rushing off to help a customer who was checking out pickup trucks.

Michael's Harley-Davidson in Cotati also recently advertised job openings, said Steve Czegus, manager of Job Link, the county program that offers training and job-search assistance.

"People obviously are feeling a little more confident in their financial situation if they're willing to spend money on a Harley-Davidson, which would typically be seen as a luxury item," Czegus said.

Jorge Donan, 28, of Petaluma, said he's been postponing a car purchase for a while. If the pricing was right, he'd consider a new over a used model, he said.

"I'm trying to find the best car for my wife so she can take the kids to school," Donan said. "I've been trying to wait, and save a little more money."

He browsed the new and used cars on local lots, looking for inspiration. Drivers held onto cars longer during the recession, creating demand for used cars that outstripped supply, and sending prices for used cars soaring. New car dealers saw the opportunity and scrambled to get more used cars on their lots beyond the trade-ins they typically offer.

Customers who are hoping to save money at the pump by buying a more fuel-efficient model, or those who just can't wait any longer to replace their aging cars, are a big portion of the buyers, Hansel said.

"These are people who no longer had the confidence that their car is going to get them to work every day, but they held onto them because of economic uncertainties," Hansel said.

Nationwide, new light vehicle registrations are expected to rise 6.6 percent this year to 15.3 million vehicles, according to Polk, an global automotive market research firm. But the group warns that car sales likely won't return to pre-recession levels for many years.