Behind the foreclosure surge in New York, New Jersey

FORTUNE – Just as most of us believe we’ve seen the worst of the housing market’s collapse, two unlikely states are only now getting hit with a wave of foreclosures: New York and New Jersey.

The region was largely spared when home prices disastrously tumbled in 2007. New York and New Jersey, with some of the nation’s priciest homes and highest property tax rates, saw nowhere near as many foreclosures during the Great Recession as most of the rest of the country. But that has changed.

Next to Florida, New York and New Jersey have the highest share of homes undergoing foreclosure relative to all homes with mortgages, according to a report by CoreLogic. In February, Florida had the highest share at 9.9%, followed by New Jersey at 7.2%, and New York at 5%.

Investor frenzy over housing has peaked

This might come as a surprise, given that household finances in the two states have generally fared better than the rest of the country in recent years. But while there are fewer mortgages in New York and New Jersey entering foreclosure every month than nationally, more of them have been getting stuck in the process. That’s because the two states use a judicial foreclosure process, which generally requires that foreclosures go through a state court.

Between 2010 and 2012, the share of mortgages entering foreclosure each month was 0.24% in upstate New York, 0.36% in downstate New York and 0.40% in northern New Jersey — all lower than the national average of 0.42%, according to a recent report by the Federal Reserve of New York. This is a good thing, but since foreclosures take longer to process, it also slows down the region’s housing recovery. On average, it takes 503 days to complete a foreclosure in New York and 481 days in New Jersey, markedly higher than 318 days nationwide, according to the Fed.

This says less about the strength of the recovery than the unintended consequences of New York and New Jersey’s foreclosure laws. While the regulations certainly protect homeowners, they also hamper the housing market’s healing process.

MORE: Even housing bears bought big homes before the crash

The longer a home is in foreclosure, the greater the potential for it to deteriorate and for its price to decline, the Fed notes. There’s little, if any, incentive for homeowners to maintain or improve their homes once they start the foreclosure process. As a result, the homes tend to deteriorate more rapidly than otherwise similar homes.

Home prices in New York and New Jersey have stabilized, but the Fed expects foreclosures to continue dragging down prices in the coming months. True, the housing markets in these two states are already pricier than most of the rest of the country. And keeping them lower would make homes more affordable, which isn’t so bad for buyers. It does, however, mean the residual effects of the Great Recession may linger longer.

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.