The prosecutor, Preet Bharara, said he was seeking more than $1 billion, but the suit could ultimately recover much more in damages.

‘‘This lawsuit should send another clear message that reckless lending practices will not be tolerated,’’ Bharara said in a statement. He described Countrywide’s practices as ‘‘spectacularly brazen in scope.’’

Get Talking Points in your inbox:

An afternoon recap of the day’s most important business news, delivered weekdays.

He also charged that Bank of America has resisted buying back soured mortgages from Fannie Mae and Freddie Mac, which bought loans from Countrywide.

Bank of America spokesman Lawrence Grayson said the bank ‘‘has stepped up and acted responsibly to resolve legacy mortgage matters.’’ He called the allegation that the bank has failed to buy back loans ‘‘simply false.’’

‘‘At some point,’’ Grayson said, ‘‘Bank of America can’t be expected to compensate every entity that claims losses that actually were caused by the economic downturn.’’

Countrywide was a giant in mortgage lending, but was also known for approving exotic, even risky, loans. By 2007, as the market for subprime mortgages collapsed, Countrywide was anxious for revenue.

The lawsuit alleged that the company loosened its standards for making loans while telling Fannie Mae and Freddie Mac, which were buying loans from Countrywide, that standards were getting tighter.

Fannie and Freddie, which packaged loans into securities and sold them to investors, were effectively nationalized in 2008 when they nearly collapsed under the weight of their mortgage losses.

To churn out more mortgage loans, Bharara said, Countrywide introduced a program called the ‘‘Hustle,’’ shorthand for ‘‘High-Speed Swim Lane.’’ It operated under the motto, ‘‘Loans Move Forward, Never Backward.’’

The program eliminated checks meant to ensure that mortgages were being made to borrowers who could afford them, according to the lawsuit.

For example, loan processors no longer had to complete worksheets that helped them assess whether income levels that borrowers entered on their loan applications were reasonable.

If processors entered a borrower’s information into a computerized underwriting program and the program raised flags, employees had incentives to change the numbers, the suit said.

It also said that bonuses were awarded based solely on the number of loans that an employee could generate, not on their quality.

The process led to ‘‘widespread falsification’’ of mortgage data, Bharara charged. And when Countrywide executives became aware of the dangerously high number of borrowers defaulting, it hid the problem, according to the lawsuit.

In early 2008, for example, Countrywide offered bonuses for employees who could ‘‘rebut’’ the high rate of defaults. The standards were low, according to the lawsuit: If a review found that the income a borrower listed on his application seemed unreasonable, an employee could rebut the finding ‘‘simply by arguing that the stated income was reasonable.’’

The lawsuit accused Countrywide, and later Bank of America, of selling thousands of Hustle loans to Fannie and Freddie. The lawsuit says that that the Hustle program continued through 2009.

According to the lawsuit, Fannie and Freddie don’t review loans before they purchased them. Instead, they relied on banks’ statements that the loans met certain qualifications.

Bharara said the lawsuit was the first civil fraud suit brought by the Justice Department concerning loans later sold to Fannie and Freddie.