There have been numerous reports about how poorly the Obama administration's mortgage modification program has been doing. I've written a few posts about servicers having trouble cooperating or not wanting to. Another enormous wrench has just been thrown into its gears: now even when banks want to make modifications they might not be able to. A federal court has ruled this week that Countrywide, formerly the largest mortgage company but now owned by Bank of America, cannot hide behind the foreclose prevention legislation if mortgage-backed securities (MBS) investors try to prevent the modification. This is pretty significant news, since so many troubled mortgages are part of MBS.

By now most readers probably know what MBS are. After all, President Bush explained them during a prime time press conference last fall. Many of the currently underwater mortgages were packaged as securities and purchased by investors. Generally, the legal documents associated with those securities do not allow banks to alter the terms of the mortgages without the consent of the investors' who hold the MBS. Countrywide thought that this year's foreclosure prevention legislation allowed them to modify mortgages anyway despite what investors might think. The recent court ruling indicates otherwise.

Here's some detail about the ruling, via Gretchen Morgenson of the New York Times:

Bank of America, which took over servicing of the investors' loans when it bought Countrywide in 2008, is defending the case. It argued that the matter belonged in federal court and that any contractual obligations to repurchase modified loans were trumped by the Helping Families Save Their Homes Act of 2009. Under that law, servicing companies that agree to modify loans receive some protection from liability arising from the loan changes.

Judge Holwell ruled that the immunity granted under the legislation did not prevent Countrywide's investors from trying to enforce their rights under the mortgage securities contracts. The investors must prove that Countrywide's pooling and servicing agreement covering their loans does indeed require it to repurchase mortgages the bank modifies, the judge said, ruling that the case belongs in state court.

Shirley Norton, a spokeswoman for Bank of America, said it was reviewing the order and considering its options. "The court did not rule that the safe harbor is inapplicable," Ms. Norton said, merely that it did not fall under federal jurisdiction.

That may be true, but it certainly looks like a win for investors. They also like their chances:

"This is a first step in a decision by a federal judge that says even after the servicers' safe harbor was enacted and even after all the wrangling in Congress, we are still going to allow people to enforce their contract rights when it is appropriate," said Owen L. Cyrulnik, counsel at Grais & Ellsworth in New York, which is representing investors in the suit against Countrywide.

Investors sued Countrywide because they did not want to be forced to take losses associated with drastically reducing interest rates or principal on these mortgages to avoid foreclosures. Some might argue that these modifications would have made investors better off, as massive foreclosures in this real estate market might produce greater losses than modification efforts. Investors must have disagreed, however.

Given the vast number of mortgages that are part of MBS, this ruling may fatally wound Washington's hopes for preventing millions of foreclosures if it stands.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.