As state and federal officials near completion of a settlement with banks over shoddy foreclosure practices, a question that has loomed over the talks for months remains: Is it a good enough deal?

After nearly 500 days of drawn-out negotiations, public infighting and private cajoling, the emerging settlement would force banks to overhaul their mortgage-servicing practices. It could also require the banks to pay as much as $25 billion in penalties that would be put toward helping struggling homeowners and borrowers who lost their homes to foreclosure in recent years.

The precise size of the deal hinges largely on the participation of California, whose attorney general, Kamala Harris, has called previous proposals “insufficient,” saying that the relief offered would not enable enough of the state’s homeowners to stay put and would “excuse conduct that has not been adequately investigated.” Officials close to the negotiations said Monday that while California has continued to withhold its support, Harris still could sign on to the settlement if several concerns are addressed, including the extent of legal immunity that banks would get and the process for determining which homeowners would receive help.

State attorneys general originally were given a deadline of last Friday to say whether they would support the proposed settlement. That deadline got pushed to Monday. Even then attorneys general from California and Nevada said they were continuing to evaluate the deal and negotiate last-minute changes.

With or without California, the deal is likely to move forward and become the largest industry settlement since a multi-state deal with tobacco companies in 1998.

Still, some liberal groups and consumer advocates have argued that the expected terms amount to little more than a drop in the bucket, given the size of the housing crisis. Millions of homeowners remain either in foreclosure or are badly delinquent on their mortgages, and the pending deal would reach only a fraction of them.

For months, such groups have urged the Obama administration to undertake deeper investigations into mortgage-related misdeeds and to push for a much larger settlement later than rush into a less substantial deal now. The groups also have been worried that officials might let banks off the legal hook with little more than a slap on the wrist.

For instance, the group Campaign for a Fair Settlement issued a statement over the weekend saying it was “deeply concerned” about the push to finalize the current deal. AFL-CIO President Richard Trumka said recently that “a sum significantly larger than the rumored $25 billion is needed,” given the $750 billion in “negative equity” that exists from borrowers who owe more than their homes are worth.

Other housing experts have applauded the administration and state attorneys general for negotiating what they called a meaningful, if admittedly limited, foreclosure settlement.

“Does it go far enough? No. Does more need to be done? Absolutely. Is it a step in the right direction? Yes,” said Ira Rheingold, president of the National Association of Consumer Advocates. “It’s not going to solve all the problems we have right now. There’s a long way to go still to undo all the damage that was done.”

That’s essentially the argument made by Iowa Attorney General Tom Miller, U.S. Housing and Urban Development Secretary Shaun Donovan and others involved in the negotiations. They say the current settlement was never intended to cure all the ills of the housing crisis — or to prevent separate investigations into other areas such as how mortgages were bundled and sold to investors — but rather to change abusive business practices and get relief to as many homeowners as possible, as soon as possible.

“Based on the numbers alone, this is pretty modest,” said Christopher Mayer, a professor at Columbia Business School. But he added that the numbers don’t account for the broader impact that the settlement could have on the housing market. Mayer said a deal probably would lead to more industry-wide loan modifications and would help jump-start foreclosures that have languished since reports of flawed and fraudulent legal filings came to light in 2010, causing banks to halt many legitimate foreclosures. “There are no silver bullets,” Mayer said, but the current deal “is an important step forward.”

Miller said that more than 40 states have signed on to the deal. A handful of other states remain undecided, including New York and Nevada.

The pending settlment would force five lenders at the heart of the talks — Wells Fargo, Bank of America, J.P. Morgan Chase, Ally Financial and Citigroup — to revamp how they interact with troubled homeowners and would bar them from trying to foreclose on borrowers while simultaneously negotiating mortgage modifications.

Officials say it would also include about $17 billion that would go toward foreclosure-prevention measures, such as reducing the loan balance for borrowers who owe more than their homes are worth or lowering interest rates for homeowners current on their loans. In addition, as many as 750,000 borrowers who lost their homes to foreclosure since 2008 would be eligible for payouts of about $2,000 each, without surrendering their right to join future lawsuits, state officials said.

Staff writers Olga Khazan and Sari Horwitz contributed to this report.