Some local banks, particularly those with large mortgage and commercial lending businesses, saw sizeable gains in third-quarter profits as low interest rates helped boost demand for refinancing and new home purchases.

At Cardinal Financial, which posted the highest gains in the area, profits were up 68 percent.

“Generally speaking, mortgages have been a very big driver,” said Carter Bundy, an analyst for Stifel Nicolaus & Co. “Banks that are well-positioned for both mortgages and commercial banking have really benefited above the rest.”

Other area banks with double-digit earnings growth included Virginia Heritage Bank (up 57 percent from last year), Eagle Bank (49 percent), Capital One Financial (47 percent), Virginia Commerce (29 percent) and Tri-County Financial Corp. (22 percent).

“The big thing we’re seeing is higher mortgage revenue — mostly from refinancings,” said Catherine Mealor, senior vice president at investment bank Keefe, Bruyette & Woods. “In D.C., more so than in the rest of the country, we’re also seeing greater momentum for home purchases.”

Indeed, mortgage lending for both new purchases and refinancings increased throughout the region.

Home loans were up 56 percent at Cardinal Bank, helping boost the bank’s earnings to $14.5 million, or 49 cents a share, from $8.6 million, or 29 cents a share, last year.

“The total assets of our company now exceed $3 billion as our mortgage banking production continued to be exemplary,” Bernard Clineburg, chairman and chief executive of Cardinal Financial, said in a statement.

The bank also continued to rid its books of troubled loans, which currently account for 0.3 percent of total assets, down from 0.43 percent last year.

Bundy said he expects banks to continue to reap the benefits of low interest rates and improving consumer sentiment.

Bank profits “are going to be stronger for longer,” Bundy said. “You’ve got a housing market that’s showing signs of recovery — and people start feeling better when real estate begins improving.”

But not all financial institutions are benefiting. Two of nine area banks that recently posted third-quarter earnings reported a drop in profits.

Legal settlements totaling $3.3 million dragged down earnings at United Bankshares by 3.4 percent.

Meanwhile, Olney-based Sandy Spring Bancorp said profits were down 2.4 percent to $10.9 million, or 44 cents a share, from $11.3 million, or 47 cents a share.

“The struggling economy and intense competition in our markets limited our loan growth during the quarter,” Daniel J. Schrider, the bank’s chief executive, said in a statement, adding that an increase in mortgage loans had helped boost the bank’s earnings.