Commercial real estate exposure took down two banks in May, but bank failures overall declined during the month, Trepp Analytics said Wednesday.

Only two banks failed in May, compared to the average 5.5 bank failures reported in the months of January through April. In the first five months of 2012, there were 24 bank failures, down from 44 in the first five months of 2011 and 78 during the same period in 2010.

While bank failures declined overall, 205 banks are still on Trepp's list of high-risk banks.

The failed banks from May included Security Bank, National Association in Florida and Alabama Trust Bank in Alabama.

As for what is causing the banks so much trouble, Trepp blames commercial real estate exposure with CRE loans making up $13.8 million of the $23.9 million nonperforming loans at the failed banks. Commercial mortgages made up $9 million of the failed loans in May, while construction and land loans represented $4.7 million of the non-performing loan portfolio.

Residential mortgages were a secondary stress with $6.3 million of the total nonperforming loans backing homes.