Bank of America (BAC) reported strong first-quarter earnings amid higher mortgage originations.

The Charlotte-based bank posted net income of $3.4 billion, or $0.27 per diluted share, for the first quarter of 2015, compared to a loss of $276 million, or $0.05 per share, in the year-ago period.

This beat analysts EPS forecasts by $0.07, while revenue missed by $80 million. 

The bank originated $13.7 billion in first-lien residential mortgage loans and $3.2 billion in home equity loans in the first quarter of 2015, compared to $11.6 billion and $3.4 billion, respectively, in the fourth quarter of 2014, and $8.9 billion and $2 billion, respectively, in the year-ago quarter.

Meanwhile, provision for credit losses decreased $93 million from the year-ago quarter to $716 million in the first quarter of 2015 due to continued improvement in credit quality within the credit card portfolio, which was partially offset by a slower pace of credit quality improvement within the home loans portfolio.

Legacy Asset Servicing recorded a loss of $238 million for the first quarter of 2015, compared to a loss of $4.9 billion for the same period in 2014, driven by lower expenses, primarily litigation expense, and higher mortgage banking income.

“Continuing the trend from last quarter, we saw core loan and deposit growth, higher mortgage originations, and increased wealth management client balances," said CEO Brian Moynihan.

“At a time of continued low interest rates, we had good expense control as we focus on responsible growth with a balanced platform to create long-term value for customers and shareholders,” he added.

"We continued to strengthen an already strong and liquid balance sheet this quarter," said Chief Financial Officer Bruce Thompson. "We improved our liquidity, accreted capital and tightly managed expenses in a challenging interest rate environment. Meanwhile, credit quality remained strong, reflecting both the economic environment and our risk underwriting."