New York City’s renters might have a fighting chance in housing court thanks to the mayor.

Last week, New York City Mayor Bill de Blasio and City Council Speaker Melissa Mark-Viverito announced that the city would fund universal access to legal counsel to tenants in eviction cases in New York City Housing Court. The de Blasio administration will invest an extra $1.9 billion to create 10,000 apartments for families making less than $40,000 per year.

The right to counsel applies to low-income families who are below 200 percent of the poverty level for a family of four ($50,000). It’s an expansion of an ongoing effort to address the affordable housing crisis in the five boroughs.

“No longer will low-income New Yorkers have to face the prospect of showing up to court with inadequate legal representation, just because of a financial burden,” said New York City Council Member and Deputy Leader and Chair of the Committee on Housing and Buildings Jumaane Williams in statement. “And as I and many others have argued for, deeper affordability has taken up more space in the Mayor’s housing plan.

De Blasio’s announcement marked a victory for the Right to Counsel Coalition, which included tenant groups and other organizations, such as The Urban Justice Center, Coalition for the Homeless, The Legal Aid Society and AARP New York.

“This agreement represents a huge step towards making New York City a more fair and equitable place,” stated Chris Widelo, associate state director for AARP New York. “It will prevent wrongful evictions and save taxpayers hundreds of millions of dollars in the process by keeping New Yorkers in their homes and out of the shelter system. AARP thanks the mayor, City Council Members Mark Levine and Vanessa Gibson and the Council for coming together to protect New Yorkers by providing access to counsel.”

According to AARP New York, preventing wrongful evictions could save city taxpayers $320 million a year. The estimated per case price for full legal representation in housing court is $1,600-$3,200. The cost per bed in a city municipal shelter is $36,000 a year.

The number of tenants in housing court with legal representation rose to 27 percent, compared with 1 percent in 2013. Since beginning the expansion of tenant legal aid in 2015, evictions dropped by 24 percent. Levine and Gibson proposed the right to counsel initiative.

“This announcement marks the beginning of a new era for tenants in New York City,” said Levine in a statement. “No longer will low-income New Yorkers have to face the life-altering threat of an eviction alone. I am proud that the Council and Mayor de Blasio have come together to make this historic program a reality.”

Bronx Borough President Ruben Diaz Jr. said that “right to counsel” is something that his administration considered a priority, and he liked that the mayor felt the same way.

“Research shows this proposal would be cheaper than funding shelter beds and other services for tenants who might otherwise become homeless,” said Diaz in a statement. “With several major rezonings under consideration across the five boroughs, including the administration’s proposal for the Jerome Avenue corridor, it is imperative that we provide tenants with the tools they need to stay in their communities during times of transformation.