Federal prosecutors won't file a fraud lawsuit against former Countrywide Financial chief executive Angelo Mozilo over the sale of billions of dollars' worth of subprime loans before the mortgage meltdown, his attorney said Friday.

The decision not to file a civil case was announced to Mozilo's attorneys by letter this week and followed a two-year investigation.

"We are gratified by the Department of Justice's determination to close its investigation without litigation," Mozilo attorney David Siegel said in an email.

That effectively ends the chances of Mozilo facing a federal case. Prosecutors declined to file criminal charges against him in 2011.

Mozilo, 77, co-founded California-based Countrywide. The loan giant helped fuel the housing bubble by giving mortgages to people who were financially unqualified. The resulting defaults contributed to a housing market crash and a massive bailout of financial institutions by U.S. taxpayers.

In 2010, Mozilo agreed to pay $67.5 million to settle a lawsuit brought by the Securities and Exchange Commission. Mozilo didn't acknowledge any wrongdoing and most of the money was paid by insurers and by Bank of America, which acquired Countrywide in 2008.

The decision not to pursue a Department of Justice lawsuit against Mozilo follows a setback in the similar prosecution of former Countrywide executive Rebecca Mairone.

Prosecutors contended that she was part of an effort to push low-quality mortgages to the government-controlled Fannie Mae and Freddie Mac programs.

In May, a federal appeals court in New York overturned the civil fraud verdict against Mairone, saying the government had failed to show any fraudulent intent.