(Bloomberg News) Morgan Stanley reached a settlement with MBIA Inc. over credit-default swaps that led to billions of dollars of losses for the bank, agreeing to terminate the contracts and drop a challenge to the insurer's restructuring. Shares of both companies rose.

MBIA will make a $1.1 billion cash payment to Morgan Stanley as part of the settlement, according to a person familiar with the agreement who asked not to be named because the amount hasn't been made public. Morgan Stanley will take a $1.2 billion loss this quarter related to the deal, the New York-based bank said today in a statement.

Morgan Stanley's exposure to MBIA, and its attempts to hedge those risks, have resulted in losses of about $3 billion since the start of 2008, not including today's announcement. The settlement will increase Morgan Stanley's capital, boosting the Tier 1 common ratio under new rules by about 75 basis points, according to the statement.

"It's critical that we reposition for the new regulatory environment and do so quickly," Morgan Stanley Chief Executive Officer James Gorman said in the statement. "A top priority for 2011 was to address this large outstanding legacy exposure and this settlement is consistent with our efforts to build capital and de-risk the balance sheet."

Morgan Stanley rose 66 cents, or 4.3 percent, to $16.04 at 10:19 a.m. in New York. MBIA jumped 2.6 percent to $11.70.

The bank's loss will come from writing down the value of the swap contracts with MBIA. Morgan Stanley had $4.9 billion of gross derivative counterparty risk to MBIA as of Sept. 30, and $2.7 billion after credit valuation adjustments, according to its quarterly filing with the SEC. The bank also had about $700 million of hedges against MBIA.

The agreement "removes a legal headache, and should give a boost to Morgan's balance-sheet efficiency" Glenn Schorr, an analyst at Nomura Holdings Inc., said in a note to investors. The deal "could also cause the firm's CDS spread to tighten as earnings volatility should decline," Schorr said.

MBIA, based in Armonk, New York, will withdraw a suit against Morgan Stanley relating to $223 million of residential mortgage-backed securities. Morgan Stanley plans to end its participation in litigation challenging the split of the insurer's business.

"This settlement is good for Morgan Stanley, good for MBIA and good for the markets and our financial system, allowing firms to move forward and rebuild," Benjamin Lawsky, New York state's financial services superintendent, said in a separate statement.

Bank of America