LOS ANGELES — Home prices rose in nearly 60 percent of U.S. cities in the first quarter of this year, as the housing market started to stabilize thanks to billions of dollars in federal spending.

The median sales price for previously occupied homes rose in 91 out of 152 metropolitan areas tracked in the January-March quarter versus a year ago, the National Association of Realtors said Tuesday.

There were double-digit price increases in 29 cities — a sharp improvement from the fourth quarter of last year, when prices rose in about 40 percent of cities.

The tax credits — $8,000 for new buyers and $6,500 for current owners — helped gin up home sales this spring as many buyers raced to purchase a home in time to qualify before the incentives expired at the end of April.

Sales of previously occupied homes surged in March after a three-month decline caused in part by harsh winter weather.

In all, about 2.2 million households had used the first-time buyer credit as of late March at a cost of $16 billion, according to the Internal Revenue Service.

The Washington D.C.-based trade group credited the government incentives for generating about one million additional sales, helping to bring down the inventory of unsold homes.

"Without that tax credit, if we had an additional million unsold homes on the market, the inventory would be so out of whack that we would be seeing prices continuing to decline