Citigroup Inc. posted a $4.28 billion profit, buoyed by gains from selling control of its Smith Barney brokerage and beating analysts? estimates as the bank shed assets to compensate for loan losses.

Second-quarter earnings were 49 cents a share, compared with a loss of $2.5 billion, or 55 cents, a year earlier, New York-based Citigroup said on Friday in a statement. Excluding the Smith Barney gain of $6.7 billion, Citigroup had an operating loss of about 27 cents a share. That was better than the 33-cent average loss estimate of 12 analysts in a Bloomberg survey.

Consumer and business loan delinquencies kept rising, giving chief rxecutive officer Vikram Pandit little relief from the financial crisis that forced him to take a $45 billion government bailout and unload some of his biggest units. The bank, once the nation?s largest by assets, now ranks third after Bank of America Corp and JPMorgan Chase & Co.

?This company is going to be shrinking,? said Ed Najarian, an analyst at institutional brokerage International Strategy & Investment Group in New York. ?You?ve got to factor that into your analysis of the ability to absorb losses over the next 18 months.? Smith Barney, now part of a joint venture controlled by former Pandit employer Morgan Stanley, had $10.2 billion of revenue last year, or 19% of Citigroup?s total.

The company?s share price is down 95% from a December 2006 peak, even after jumping 17% this week amid signs the worst of the recession may be over. The stock closed at $3.03 in composite trading on the New York Stock Exchange on Thursday and was at $3.09 at 8:41 am.

The businesses that Pandit plans to keep, grouped in a division called Citicorp, had a $3.06 billion profit in the quarter, down 11% from a year earlier. Stock-trading revenue fell 28% to $1.1 billion and private-banking revenue fell 20% to $477 million, overwhelming a 26% gain in fixed-income trading revenue to $5.57 billion. Debt underwriting climbed 14% to $751 million.

Citi Holdings, the division of businesses that Pandit is selling or winding down, including the Smith Barney results, had a $1.36 billion profit, compared with a $5.23 billion loss reported a year earlier. Absent the Smith Barney gain, the division had a $5.36 billion loss. The bank?s costs for bad loans in the quarter jumped by 75% to $12.2 billion. Late credit card loans increased to 3% of the total, from 2.1% a year earlier.

?Our most significant challenge now remains consumer credit,? Pandit said in the statement. ?Losses in our consumer businesses have been growing for some time, but we see some positive signs of moderation in those loss trends.?

Citigroup?s operating loss contrasted with profits posted by its biggest rivals. Charlotte, North Carolina-based Bank of America said today second-quarter profit was $3.22 billion. New York-based JPMorgan on Thursday reported second-quarter earnings of $2.7 billion, up 36% . On July 14, Goldman Sachs Group Inc., which also has its headquarters in New York, posted a 65% increase in profit to $3.44 billion. Citigroup plans to dilute current shareholders by 76% under a plan to convert $33 billion of preferred shares and $25 billion of the government?s bailout stake into common stock. Under that conversion, set to begin as soon as this month, the government would end up with a 34% stake.

Bloomberg