With complaints from struggling homeowners mounting, government officials are pressing five of the nation’s largest banks to fix the way they handle requests for mortgage relief — or face further court action.

On Wednesday, the court-appointed monitor of the $25 billion national mortgage settlement added four tests to measure how well banks are complying with the landmark agreement to clean up shoddy foreclosure practices. If the banks flunk the tests, the monitor could drag them into court.

Not everyone is waiting.

New York Attorney General Eric Schneiderman, one of 49 state attorneys general who negotiated the mortgage deal last year, filed a lawsuit Wednesday against Wells Fargo for allegedly violating the terms of the settlement.

At the time, Schneiderman said his office received 339 complaints from New Yorkers fighting to save their homes. Homeowners said the banks refused to allow them to submit missing documentation, or failed to respond to requests to have their mortgage balance or interest rates reduced within the 30 days allotted in the settlement.

Both banks said they were willing to address the disputes, but Schneiderman said talks with Wells Fargo came to an impasse when the bank declined to sign an agreement to improve its customer-service practices.

“While Bank of America has chosen to work with us to take the steps required to adhere to their commitments, Wells Fargo has taken a different path,” Schneiderman said at a news conference. “Both of these cases should send a strong message that the big banks must comply with the legally binding standards in the settlement, or face the consequences.”

Wells Fargo spokeswoman Vickee J. Adams said the bank has “voluntarily taken steps to put into place all of the customer- service changes that would have been part of an agreement with the New York attorney general.”

She added: “Wells Fargo has completed more than 880,000 loan modifications nationwide, including 26,000 modifications for borrowers in New York. That means we have done six modifications for every one foreclosure sale in the state since the beginning of 2009.”

New York’s top prosecutor brokered an agreement with Bank of America, which promised, among other things, to deploy additional staff members to field questions from housing counselors.

“We are pleased to resolve these matters without litigation,” said Dan B. Frahm, a spokesman for Bank of America. “Along with the settlement monitoring committee, we continue to improve the experience for eligible customers and groups that represent them.”

For months, state attorneys general, including Lisa Madigan of Illinois and Martha Coakley of Massachusetts, have been raising concerns with the settlement monitor, Joseph A. Smith, over mortgage servicers violating the terms of the deal.

In June, the monitor released a study that supported the charges being made by state prosecutors that Bank of America, Citigroup, JPMorgan Chase and Wells Fargo were failing to comply.

The settlement was supposed to ensure that struggling homeowners would not have to endure the same miscommunication, delays and botched paperwork that was commonplace after the housing bust. But the monitor discovered that some things had not changed.

Four of the five banks failed at least one of the 29 metrics used to measure their compliance with the 304 servicing standards outlined in the settlement. The poor results, coupled with some 100,000 consumer complaints, led Smith to add measures.

“Time and time again, I have heard their ongoing frustrations with the loan modification process, single points of contact, and billing and account statement issues,” Smith said. “These new metrics are a step forward and will improve the functioning of the settlement.”

Banks will have to prove that they are providing borrowers accurate information and a single point of contact starting in January. They will also have to show that no foreclosure proceedings were enacted as borrowers submitted documentation, and that borrowers receive an explanation if their mortgage requests are denied starting in April.

The five servicers have provided $51.3 billion worth of loan modifications, short sales, refinancing and forbearance assistance to 643,726 borrowers across the country, according to a report released last month by the settlement monitor.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.

To pause and restart automatic updates, click "Live" or "Paused". If paused, you'll be notified of the number of additional comments that have come in.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.