The judgement is a victory for the Justice Department, which has faced stiff criticism for not doing enough to hold Wall Street accountable for an array of alleged wrongdoing. (Spencer Platt/Getty Images)

A federal judge on Wednesday ordered Bank of America to pay $1.27 billion in damages over thousands of defective mortgages sold by its Countrywide Financial unit, delivering a win for the government in one of the few major trials stemming from the financial crisis.

The decision arrives as the nation’s second-largest bank is locked in negotiations with the Justice Department to resolve a probe into its sale of other faulty mortgage securities, talks that could result in the bank paying more than $12 billion. That would be on top of the $50 billion that the bank has already doled out to settle a series of cases largely tied to recession-era misdeeds.

The judgement is a victory for the Justice Department, which has faced criticism for not doing enough to hold Wall Street accountable for an array of alleged wrongdoing — including selling bad loans to investors and using fraudulent documents to foreclose on struggling homeowners.

Wednesday’s ruling by U.S. District Judge Jed Rakoff in Manhattan comes nine months after jurors found Bank of America and former Countrywide executive Rebecca Mairone liable for defrauding Fannie Mae and Freddie Mac, the government-controlled mortgage-finance twins.

Prosecutors allege that Countrywide stripped safeguards designed to catch mortgage fraud from loans as part of a program known as “Hustle” and then peddled the mortgages to Fannie and Freddie. The mortgage-finance companies were on the hook for more than $1 billion in losses once the housing market crashed, according to the complaint.

In handing down his ruling, Rakoff said he took into consideration the fact that only some of the nearly $3 billion in loans that Fannie and Freddie purchased had defects. The $1.27 billion award reflects the faulty loans identified by a government expert during the trial, he said.

The award surpasses the $848.2 million sought by the Justice Department.

Preet Bharara, the U.S. attorney in Manhattan, praised Rakoff for imposing “stiff penalties” in a case his office pursued to “punish and deter the fraudulent and reckless lending activities of a financial institution leading up to the financial crisis.”

Federal prosecutors have endured unrelenting criticism for resolving crisis-era cases through settlements that some say have given Wall Street firms an easy way out, albeit an expensive one. Taking the Bank of America case to trial and winning the judgment may be a step toward changing that perception.

Bank of America spokesman Lawrence Grayson said the company is “reviewing the ruling, and will assess our appellate options.”

He pointed out that the scope of the case was narrowed before trial in Bank of America’s favor. The court threw out charges that the bank violated the False Claims Act, which would have let the Justice Department seek triple the amount in damages. A judge also found that Bank of America did not continue Countrywide’s alleged misconduct when it purchased the lender in 2008.

“This figure simply bears no relation to a limited Countrywide program that lasted several months and ended before Bank of America’s acquisition of the company,” Grayson said.

Federal prosecutors say Countrywide created the “Hustle” program in 2007 to ramp up the production of home loans.

Company executives not only stripped safeguards but allegedly awarded bonuses based on the volume of mortgages employees issued, according to the complaint. As a result, the “defect rates” were nine times higher than the industry norm. But Countrywide hid that from Fannie Mae and Freddie Mac.

Federal officials learned of the program from Edward O’Donnell, the head of underwriting at the company. O’Donnell warned his superiors that the program was creating poor-quality loans, but they ignored his concerns, according to the Justice Department. O’Donnell could receive as much as $1.6 million as a reward for whistleblowing, but prosecutors say a decision has yet to be made.

With O’Donnell’s information in hand, Justice filed a complaint in October 2012 under a powerful 1980s-era law known as the Financial Institutions Reform, Recovery and Enforcement Act, commonly called FIRREA. The law has a lower burden of proof, strong subpoena power and a 10-year statute of limitations, twice as long as the usual limit for financial fraud cases.

In a ruling last year, Rakoff said Justice could apply the little-used statute in its case against Bank of America, a decision that legal experts say will usher in more fraud cases against banks. It is the first case in which a bank or any of its executives has been found liable under FIRREA for crisis-era mortgage fraud, according to federal prosecutors for the Southern District of New York.

Bank of America’s legal woes are largely tied to its $2.5 billion purchase of Countrywide Financial in 2008, once one of the nation’s largest home lenders, and its $50 billion acquisition of Merrill Lynch in 2009.