Bank of America, the second biggest US bank by assets, posted a first-quarter profit, narrowly beating analysts' estimates.
The bank said its legal costs fell steeply as it earned more from mortgage lending and investment and brokerage services.
Bank of America reported a surprise loss in the year-earlier quarter after taking a charge of $6 billion for legal costs.
The bank's litigation expenses fell to $370m in the latest quarter, suggesting again that the worst of its legal troubles may be over.
Higher legal bills have been undermining cost-cutting initiatives introduced by chief executive Brian Moynihan since he took the bank's top job in 2010.
The bank has booked at least $70 billion in legal expenses to settle disputes stemming from before and during the financial crisis.
An $8.5 billion settlement with mortgage securities investors - the bank's largest related to the financial crisis - got court approval in March.
Non-interest expenses fell over 29% to $15.7 billion in the quarter ended March 31.
"At a time of continued low interest rates, we had good expense control," CEO Moynihan said in a statement.
Bank of America reported net income of $2.98 billion, or 27 cents per share, attributable to common shareholders compared with a loss of $514m, or five cents per share, a year earlier.
The bank earned 30 cents per share, according to a Thomson Reuters calculation. Analysts on average had expected earnings of 29 cents per share, according to Thomson Reuters I/B/E/S.
The bank said its revenue from fixed income, currencies commodities trading fell 6.8% to $2.75 billion.
However, revenue from foreign exchange sales and trading doubled, helped by the Swiss central bank's shock move in January to remove the franc's three-year-old cap against the euro that set off a frenzy of trading.
Mortgage banking revenue jumped 68% to $694m, while income from investment and brokerage services rose 3.3% to $3.38 billion.
Overall revenue, excluding certain adjustments, fell 5.9% to $21.42 billion.
That contrasted with the revenue gains reported by JP Morgan Chase & Co and Wells Fargo yesterday.