(Reuters) -Bank of America Corp reported a better-than-expected 30% jump in quarterly profit on Wednesday, as it benefited from loan growth as well as record-breaking M&A volumes that helped drive its investment banking business.

Flush with cash and emboldened by soaring stock market valuations, large buyout funds, corporates and financiers struck billions of dollars worth of deals in the fourth quarter, generating record advisory fees of $850 million for BofA, up 55% from a year earlier.

A recovery in consumer spending on credit and debit cards and a strong performance in the bank’s trading and advisory business also helped bolster profit.

Combined spending on credit and debit cards grew 22% to $212 billion in the latest quarter, the bank said.

Average loans and leases, excluding those from the government-backed Paycheck Protection Program (PPP), grew 3.4% from the previous quarter and 3.2% from the year-earlier period, driven by strong commercial loan growth and higher card balances.

“We significantly grew loans and deposits, which allowed us to increase net interest income by $1.2 billion versus the year-ago quarter despite a challenging rate environment,” Chief Financial Officer Alastair Borthwick said in a statement.

Bank of America’s net interest income (NII), a metric that measures the difference between the interest earned on loans and paid out on deposits, rose nearly 11% to $11.41 billion.

Overall, profit rose to $6.77 billion, or 82 cents per share for the quarter ended Dec. 31, from $5.21 billion, or 59 cents per share, a year earlier.

Analysts on average had expected a profit of 77 cents per share, according to the IBES estimate from Refinitiv.

Shares of the bank were up nearly 2% in premarket trade.

Revenue from the bank’s equities division was up 3% in the quarter, while that from fixed income trading was down 10% as stock prices continued to leap despite temporary hiccups from the Omicron coronavirus variant and a hawkish Fed.

Bank of America also released $851 million from its reserves for pandemic-related losses that did not materialize.

Non-interest expenses rose 6%, driven by higher revenue-related compensation, echoing a trend other banks have seen in rising expenses from increasing wages.

Unlike its peers, Bank of America said that it expects expenses to be flat for 2022 compared with 2021.

The bank reported revenue, net of interest expense, of $22.1 billion, up 10% from last year.

(Reporting by Niket Nishant, Noor Zainab Hussain and Manya Saini in Bengaluru and Elizabeth Dilts Marshall in New York; Editing by Anil D’Silva)