Even as the national economy has recovered to a slow if bumpy hum, the Great Recession left behind a lingering problem: homes in foreclosure, many of them abandoned. Often, the properties are left to decay, blighting communities and depressing the values of neighboring homes. This is unacceptable.

New York State has one of the largest backlogs of homes, with the second-highest foreclosure rate in the nation — about one in every 21 homes, according to state Comptroller Thomas DiNapoli. Legislation to address this nagging issue just passed the State Assembly. The Senate should approve it, too.

The bill would speed New York’s foreclosure process, now one of the longest in the country at an average of three years. The legislation would establish special courts to expedite foreclosure cases, and the banking industry eagerly favors this. In NYC last year, there were 29,167 pending cases. Citywide, the numbers fell 5 percent from 2014 to 2015. However, foreclosure cases continued to climb in Brooklyn (1.4 percent) and in the Bronx (nearly 8 percent). This persistent problem weighs down neighborhoods that need lifting.

The legislation would also require banks and loan-servicing companies to register the homes in a state database, making ownership easier to track, and to maintain the properties. Current state law says a bank must repair and care for a vacant property only after it obtains a judgment of foreclosure. This leaves abandoned properties open to abuse by squatters, drug dealers and vermin.

As it stands, localities unfairly carry the burden of so-called zombie properties. Some require that banks and lenders post security deposits, and some municipalities attach liens to property tax bills. This patchwork approach is tortured and confusing. A law that applies evenly throughout the state would make more sense.

Reducing the backlog and keeping zombie properties from dilapidation would go a long way toward strengthening housing markets and animating local economies. It’s time for New York to leave behind this legacy from the 2008 mortgage crisis.