Richard Drew, Associated Press
In this Jan. 12, 2009 file photo, Citigroup headquarters is seen in New York. Citigroup releases quarterly results before market opens Thursday April 16, 2015.

NEW YORK — Citigroup said Thursday that its first-quarter net income rose 21 percent as the company continued to slim down its operations and control expenses.

The bank earned $4.8 billion, or $1.51 a share, in the first three months of the year. That compared with $3.9 billion, or $1.23 a share, in the same period a year earlier. Revenue was $19.74 billion, down slightly from $20.21 billion a year earlier.

The bank was able to cut its expenses and legal costs across the firm in the quarter, which more than offset the decline in revenues. Citi's expenses were $10.9 billion in the quarter, down from $12.2 billion a year earlier. Legal expenses were $387 million, down from $945 million.

Citi's results beat Wall Street estimates, with analysts polled by FactSet forecasting earnings per share of $1.40.

Citi got a boost from its consumer banking division. Net income in Citi's North America banking business was $1.14 billion, up 12 percent from a year ago. Expenses in that division were down 6 percent year over year.

However Citi did not do as well as other banks in trading this quarter. Markets revenue was down 6 percent year-over-year, with bond and currency trading revenue down 11 percent. Citi reported incurred a "modest loss" when the Swiss franc jumped earlier this year.

Citi has been selling off businesses and restructuring itself for several years now, after the bank came close to collapse in the financial crisis and required government assistance to stay afloat. The bank has righted itself under current CEO Michael Corbat, selling off struggling assets and businesses.

The bank passed the Federal Reserve's "stress tests" last month, which allowed Citi to buy back its own shares from the open market and raise its dividend for the first time since the financial crisis. Even Citi Holdings, the storehouse of assets that Citi wants to dispose of, turned a profit in the quarter.

As Citi continues to slim down, so does its work force. The bank employed 239,000 staff in the first quarter compared to 248,000 staff a year ago. At the peak of the housing bubble in 2007, Citi had roughly 375,000 workers.

Citigroup shares were up 81 cents, or 2 percent, to $54 a share.