The percentage of homeowners who owe more than their properties are worth declined in the second quarter as tax credits boosted prices in California and foreclosures surged, the real estate data provider said Monday.

The Seattle company found that 21.5% of homeowners were underwater on their mortgages, down from 23.3% in the first quarter and 23% a year earlier.

The decline came as property prices in California were bolstered by state and federal benefits for homebuyers, Zillow said.

Prices climbed from a year earlier in 28% of the markets tracked in California, the most populous state.

They gained 5.5% in the Los Angeles area, 5.9% in San Francisco and 7.3% in San Diego.

"The double tax credits for some California homebuyers have certainly stimulated housing demand there and are partly responsible for the rapid — and likely unsustainable — rates of appreciation in many markets across the state," Stan Humphries, chief economist at Zillow, said in a press release.

Homebuyers seeking the federal benefit had to sign contracts by April 30 to qualify for a tax credit of as much as $8,000, and have until Sept. 30 to complete their purchases.

In California, buyers could qualify for a credit of as much as $10,000 under a program that began May 1.

Subscribe Now

Access to authoritative analysis and perspective and our data-driven report series.

14-Day Free Trial

No credit card required. Complete access to articles, breaking news and industry data.