The list of banks in imminent danger is dwindling — good news for the economy but bad for M&A's bargain shoppers.

There were a dozen critically undercapitalized banks at the end of the first quarter, according to Trepp, a data analysis firm in New York. Regulators are compelled to close banks when their capital gets that low. Several have failed in recent weeks, while one found a buyer.

"All of a sudden we saw an increase [in failures] in April," says Matthew Anderson, a Trepp managing director. "It doesn't appear that distress is picking up; it seems like the regulators are moving to clear out the list of severe problems."

The pace of failures has been dropping in recent years. Though 651 institutions remain on the Federal Deposit Insurance Corp.'s problem-bank list, 51 banks failed last year and 10 had failed this year as of late April.

Bank observers debate whether failures have slowed because the banking industry is healthier or because election-year politics, leadership changes at the regulatory agencies or other factors had an influence.

An FDIC spokesman said earlier this month that the decision to fail a bank is made by the primary regulator, not the FDIC.

Having a small number of banks with capital ratios at critically low levels is a sign that failures will become rare because the inventory of candidates is low.

"I think regulators would like to get to the point where a month or several months could go by without a failure," Anderson says. "With the list of critically undercapitalized banks now down to a handful, that pace could be in the not-too-distant future."

The news is conflicting for healthy banks looking to buy franchises on the cheap. On one hand, it means that opportunities to add deposits and loans for little to no premium are scarce. However, the chances of buying an open bank that is battered, but stabilized, have improved.

"There were some banks that had a laserlike focus on failed banks, but they can no longer limit themselves. Those days are gone," says Lorraine "Lori" Buerger, a partner at Schiff Hardin in Chicago. "Buyers need to keep an eye open to both marketplaces. … This is the nature of an improving banking environment."

Though opportunities to buy failed banks are scant, Buerger says there are still great deals in the market.

"Healthy, acquisitive banks are still looking for attractive deals with banks that have highly complementary footprints that will add to or kick-start their operations," Buerger says. "They might have to work harder now, but otherwise not much has changed."

The number of banks classified as critically undercapitalized has reached its lowest point since late 2008, Anderson said. But there is always the chance that the list could grow again.

In recent years some banks went from seemingly well capitalized to seized in the course of a quarter after exams and credit writedowns. Such situations were common in 2009 and 2010, as some bankers refused to admit deterioration in credit quality until regulators pressured them to devalue their portfolios.

"We saw a lot of capital levels drop precipitously after exams," says Randy Dennis, the chief executive of DD&F Consulting in Little Rock, Ark., which has advised several buyers of failed banks.

"We still have a lot of nonperforming assets in the market," Dennis adds.

Anderson says that roughly 40 banks were significantly undercapitalized — a level above critically undercapitalized on the regulatory scale — at March 30. That was essentially flat from the fourth quarter.

"The trend has been that the number of 'danger-zone banks,' as we call them, has been reducing," says John Hargrave, a DD&F managing principal. "There are still quite a number of banks just above critically undercapitalized, and they could very well move toward that from the passage of time."

While critically undercapitalized and significantly undercapitalized are specific regulatory categories, observers like Anderson have their own methods for gauging how many banks are still at risk of failing.

Anderson's data shows that there were still 129 banks, excluding thrifts, at high risk of failure at March 30 based on capital levels and nonperforming assets.

The prospects vary for the remaining strugglers. Some might find buyers or investors willing to recapitalize them. Others could even heal themselves. Still others will be worn down by time and likely fail.

"These are people who have survived a lot. They've scraped by and tried everything," Dennis says. "But they are just running out of gas."