A law firm that had become a lightning rod in the controversy over mortgage-foreclosure practices has shut down, costing 89 employees their jobs.

The Steven J. Baum P.C. law firm, which has offices in Amherst, N.Y., and Westbury, N.Y., has filed papers with government agencies notifying them that it plans to close. It made the filings under a federal law requiring employers to provide notice before mass layoffs.

“Disrupting the livelihoods of so many dedicated and hardworking people is extremely painful, but the loss of so much business left us no choice but to file these notices,” said Mr. Baum in a statement issued on Monday. A firm spokesman said it would have no further comment beyond the release.

Mr. Baum and his colleagues have come under fire for their foreclosure-related legal work. They are one of numerous firms across the country that represent banks and services in trying to foreclose on the millions of homeowners who have defaulted on their loans. Some of these firms’ aggressive, and, in some cases, duplicitous practices, have earned them the moniker “foreclosure mills.”

The Baum firm’s tactics, which included the “robo-signing” of documents, has been among the most criticized. Last year, a state court judge in Brooklyn called one foreclosure filing from the Baum firm “incredible, outrageous, ludicrous and disingenuous.”

Last month, the firm struck a settlement with the United States attorney’s office in Manhattan, which had been investigating the Baum firm and whether, on behalf of its lender clients, it filed misleading legal papers to expedite foreclosures. The firm agreed to pay a $2 million penalty and vowed change its practices to resolve the case.

“In mortgage foreclosure proceedings, there are no excuses for sloppy practices that could lead to someone mistakenly losing their home,” Preet S. Bharara, the United States attorney in Manhattan, said in a statement at the time of the settlement. “Homeowners facing foreclosure cannot afford to have faulty paperwork or inadequate evidence submitted, and today’s agreement will help minimize that risk.”

But despite its settlement with the federal government, the firm’s fortunes worsened this month after The New York Times published photos of a Halloween party at the Baum firm showing employees wearing costumes mocking people who had lost their homes.

After those photos surfaced, the mortgage giants Freddie Mac and Fannie Mae cut off the Baum firm, forbidding servicers of their mortgages from using Mr. Baum and his colleagues. That effectively served as the firm’s death knell.

On Saturday, Joe Nocera, The Times columnist who originally wrote about the firm’s Halloween party, published another column about the controversy. In it, he quoted an e-mail that Mr. Baum had sent him last week.

“Mr. Nocera — You have destroyed everything and everyone related to Steven J. Baum PC,” said the letter. “It took 40 years to build this firm and three weeks to tear down.”

“I think that’s what they call shooting the messenger,” Mr. Nocera wrote.