Ally Financial (GJM) will no longer originate Massachusetts mortgages through its correspondent and wholesale lending channels in the wake of the attorney general lawsuit filed Thursday. The company will honor all commitments with these lenders as of Dec. 5 and it will honor existing contracts as a servicer in the state. GMAC Mortgage, the mortgage lending and servicing arm for Ally, said "recent developments" sparked the decision. On Thursday, Massachusetts AG Martha Coakley filed the first lawsuit related to robo-signing and other foreclosure allegations against the five largest banks, including Ally. Coakley promised a large penalty to resolve the allegations. The suit alleged the banks "falsely identified themselves" as the holder of the mortgage throughout the foreclosure process and "accordingly, each foreclosure initiated or advanced by a bank defendant when it was not the current holder of the mortgage was unlawful and is void." "Costs related to the mortgage business overall increased. When you have additional litigation costs added to the equation, the business case in certain channels is no longer viable," a bank spokesperson said. Bank of America (BAC) recently exited its correspondent lending channel also citing new regulations and uncertain costs of the business, but it did so nationally. Ally Financial is the fifth largest mortgage lender in the U.S. Its correspondent channel represented roughly 84% of its originations over the past year, according to its third-quarter financial filing. "The company is disappointed that it can no longer participate in offering certain financing options in Massachusetts; however, it has an obligation to manage risks and deploy capital in an appropriate manner and in a way that protects the investment of the U.S. taxpayer," the bank said. Write to Jon Prior. Follow him on Twitter @JonAPrior.