NEW YORK ( TheStreet) -- Attorneys general from more than 40 states wrote a letter Tuesday urging Congress to extend tax relief to distressed borrowers who have their mortgage debt cancelled or forgiven because of financial hardship or a decline in housing values. Under the federal Mortgage Debt Relief Act, in effect from 2007, mortgage debt forgiven after a foreclosure or short sale or loan modification is not included in the calculation of taxable income. This exclusion, limited to primary residence mortgages and not those on second homes, expires on December 31, 2012. "This tax relief is critical for helping struggling homeowners stay in their homes as we work to repair the damage from the foreclosure crisis," Massachusetts AG Martha Coakley said in a statement. "We urge Congress to ensure families are not hit with an unexpected tax bill when seeking a loan modification." The attorneys general urged Congress to extend the relief, failing which such borrowers could face a tax increase of $1.3 billion, according to estimates from the Congressional Budget Office. The expiry of the tax exclusion, they argue, also comes at a time when considerable progress is being made under the national mortgage settlement, under which states required the big banks- Bank of America ( BAC), JPMorgan Chase ( JPM), Wells Fargo ( WFC), Citigroup ( C) and Ally Financial - to provide upto $17 billion in debt reduction and other relief measures. "Requiring a homeowner to pay income tax on forgiven or canceled mortgage debt would make the National Mortgage Settlement much less effective," they argued. "We strongly urge Congress to extend this critical tax exclusion, which expires on December 31, 2012, so that distressed homeowners are not stuck with an unexpected tax bill or deterred from participating in this historic settlement," they wrote. --Written by Shanthi Bharatwaj in New York >To contact the writer of this article, click here: Shanthi Bharatwaj. >To follow the writer on Twitter, go to http://twitter.com/shavenk. >To submit a news tip, send an email to: firstname.lastname@example.org.