For a long time, you had to pay income tax on debt that your mortgage lender forgave. During the height of the housing crisis, the federal government offered a reprieve — it stopped collecting income tax on up to $2 million of forgiven mortgage debt on a primary residence.

This tax leniency is expected to expire at the end of the year, and there’s some doubt it will be renewed.

Maryland will step in with its own relief if the federal tax break disappears. Under legislation signed into law yesterday, Maryland won’t collect state income tax on up to $1 million of forgiven mortgage debt for singles, and $2 million for joint filers. This tax relief will run until the end of 2013.

“Middle class families are still being hurt by the fallout from the housing crisis, with the average Maryland home dropping 17% in value since 2008,” said Del. Craig Zucker, the sponsor of the legislation, in a prepared statement. “The Maryland General Assembly acted quickly to prevent struggling families from being hit by an additional state tax burden, but we still need theU.S. Congress to renew the federal law so that all Americans are protected.”