Mark Lennihan, Associated Press
This Monday, Nov. 23, 2015, photo, shows a branch office of Bank of America, in New York. Bank of America reports financial earnings on Tuesday, Jan. 19, 2016.

NEW YORK — Bank of America profits rose nearly 10 percent in the fourth quarter as the bank cut costs and generated better results from lending and other activities in its consumer banking division.

The consumer banking giant said Tuesday it had a profit after payment of dividends to preferred shareholders of $3.01 billion in the three month period ending in December, or 28 cents per share. That's compared to a profit of $2.74 billion, or 25 cents per share in the same period last year. The results beat expectations. Analysts surveyed by Factset expected earnings of 27 cents per share, on average.

BofA CEO Brian Moynihan said in a prepared statement that results for the year, the highest earnings in a decade for the bank, were the result of "doing more business with each customer and client."

BofA's consumer banking business, by far its largest business by profit and revenue, had another strong quarter. The business had net income of $1.8 billion, versus $1.65 billion a year earlier, as deposits and loans grew in the quarter.

The bank's investment banking and trading division also did well, despite choppy and difficult trading last quarter. The division, called "global markets," had a profit of $185 million in the quarter versus a loss of $75 million a year earlier. Revenues for the division were $3.33 billion in the quarter, up from $3.01 billion.

Like several other banks, BofA had to set aside money to cover potential problems with its portfolio of energy loans because low oil prices have stretched the ability of some oil companies to pay their debts. BofA Chief Financial Officer Paul Donofrio said the bank had $75 million in charge-offs in energy loans in the quarter. The bank has $21.3 billion in energy loans, 2 percent of the bank's total loans, mostly to exploration and oilfield services companies.

BofA's revenue in the quarter was $19.53 billion compared with $18.73 billion the year before.

BofA's shares rose 2.5 percent in pre-market trading.