Thirty-one banks failed in the first half of 2012, down from the 48 failures in the same period last year and the 86 failed at this point in 2010.

Despite the slowing pace, analytics firm Trepp says 196 banks across the nation are at high risk of failure.

Commercial real estate exposure is the main source of problem loans for banks that are failing. In June, the sector comprised 76.4% of the total $185.3 million in nonperforming loans at the failed banks, according to Trepp. Commercial mortgages accounted for 42.1% while construction & land loans were 34.3% of the non-performing total.

Residential mortgages were a secondary source of distress, with 17.8% of the total nonperforming loans.

Of the five major commercial property types, commercial mortgage-backed security multifamily delinquencies are the highest, an aberration that’s not representative of the broader multifamily market, Trepp said in May.

Just two months after matching its lowest reading in a year, the nation’s overall CMBS delinquency rate reversed course, jumping 12 basis points in April to 9.8%, the second highest rate ever.

Seven banks failed in June, a sharp increase from the two failures in May. Five of the failures occurred in the Southeast, with one failure each in Tennessee, Georgia, Florida, North Carolina and South Carolina.

One failure occurred in Illinois, which ranks third in the nation for failures. Oklahoma was home to one failure in June, but has otherwise experienced a low failure rate, Trepp notes.

Two banks have failed so far in July, bringing the year’s total to 33. Montgomery Bank & Trust in Georgia and Glasgow Savings Bank in Missouri locked their doors for good in the month.

The June failures featured very high Trepp Fail Risk scores. Five were at 10, the highest possible score, and one was at 9.8. The firm considers any score above 8 to represent a high probability of imminent failure.