Douglas Baruch, a lawyer for Wells Fargo, told a federal judge in Manhattan that while the parties would not rule out a settlement, both sides were prepared to resume litigating after putting the case on hold since July.

"The parties are no longer as optimistic as they once were," he said.

Two weeks ago, the San Francisco-based bank disclosed in a regulatory filing that it was in discussions to resolve the lawsuit, filed in 2012, which seeks hundreds of millions of dollars in damages.

The U.S. Justice Department says Wells Fargo failed to report more than 6,000 loans that did not meet requirements for insurance under the Federal Housing Administration and failed to properly review early payment defaults.

After the complaint was filed, Wells Fargo asked a federal judge in Washington, D.C. to excuse it from the Justice Department's claims. It was rebuffed in 2013, and its appeal also failed.

At Tuesday's hearing, U.S. District Judge Jesse Furman expressed dismay that Wells Fargo and the government did not ask his approval in July to formally put the case on hold to pursue settlement talks.

While the parties asked for another four months to prepare evidence and expert witnesses, he gave them only two, taking the case into August.

"You took a chance," he said. "You did this at your own peril."

Wells Fargo spokesman Tom Goyda in a statement said the bank "will move forward with presenting our case in support of our prudent and responsible FHA lending practices."

A spokeswoman for Manhattan U.S. Attorney Preet Bharara, whose office is pursuing the civil lawsuit, declined comment.

The case was one of several Bharara's office brought against banks over related issues. Most recently, JPMorgan Chase & Co in February agreed to pay $614 million in a similar case.

In 2012, Bharara's office obtained settlements for $158.3 million from Citigroup Inc, $132.8 million from Flagstar Bancorp Inc and $202.3 million from Deutsche Bank AG.

The case is U.S. v. Wells Fargo Bank NA, U.S. District Court, Southern District of New York, No. 12-07527.

(Reporting by Nate Raymond in New York; additional reporting by Peter Rudegeair; Editing by David Gregorio)

By Nate Raymond