MBIA Inc , once the largest U.S. bond insurer, reported Monday it had swung to a first-quarter profit after a huge year-earlier loss, sending its shares 26 percent higher in after-hours trade.

MBIA said its quarterly results were helped by an accounting gain of about $1.6 billion, as the fair value of its obligations declined.

Shares of MBIA, which had closed down 3.5 percent in regular trading Monday at $6.96, rose to $8.80 in extended trading after the company posted its results.

MBIA had quarterly net income of $696.7 million, versus a loss of $2.4 billion in the year-ago period.

On a per share basis, MBIA earned $3.34 in the quarter, compared with a $12.92 per share loss last year.

MBIA and smaller rival Ambac have struggled since last year, seeing new business dry up as credit ratings were downgraded.

Bond insurers depend on high ratings to win new business, as buyers of the protection can use the insurer's own rating to boost the perceived credit-worthiness of a bond, and thereby lower financing costs.

Ambac and MBIA were downgraded by rating agencies last year after a foray into guaranteeing repackaged debt left each with heavy losses.

MBIA said the accounting gain had been partially offset in the quarter by $693.7 million in pretax loss and loss adjustment expenses on residential mortgage-backed securities.

MBIA continues to be affected by the on-going credit crisis, but we believe our financial position is more than adequate, and we're making progress in positioning our businesses for the future, said Chief Financial Officer Chuck Chaplin, in a statement.

Still, the company warned that if current market dislocation and economic conditions persist for an extended period of time or worsen, the company's liquidity resources will experience further stress.

MBIA said it could boost its cash holdings, if needed, by selling high-quality bonds in its investment portfolio.

The company is setting up a separate municipal bond arm, in hopes it will be able to rebuild its market share in this less risky part of the bond insurance market.

Angry investors, banks and counterparties are seeking to derail the plan, concerned the parent company will be stripped of its best assets.

(Reporting by Lilla Zuill, editing by Leslie Gevirtz and Tim Dobbyn)