Community bankers are struggling under new regulations. But they also are in their best shape in years.

Those contrasting accounts summarize the fate of community banks since the financial crisis. Big banks’ woes have created opportunities for small banks, which, for example, are buying branches that big banks are shedding. At the same time, community banks maintain that they are being hurt with regulations enacted with big banks in mind.

Even with their recent success, community banks say, they have been slower to rebound from the crisis than their bigger brethren.

“It’s a hell of a lot better than it was 2010 to 2012, but it’s still not where it was” in 2004 to 2006 said Camden Fine, president and chief executive of the trade group Independent Community Bankers of America, in an interview.

The mix of success and stress has fed tensions between small and big banks that recently bubbled over, with Mr. Fine publicly trading barbs with James Dimon, CEO of J.P. Morgan Chase & Co.