New York City will spend $12.3 million on efforts to provide free legal services for tenants fighting eviction.

Mayor Bill de Blasio on Monday framed the announcement as the city's latest effort to prevent rising homelessness that residents and tabloids have called attention to in recent months.

RELATED: Number of homeless rises in New York City

More than 57,000 people are reported to be living in emergency shelters across the city.

De Blasio called the free legal aid a "very powerful tool for tenants facing eviction and are victims of harassment by unscrupulous landlords." 

"This new initiative will mean that they will have a guardian, they will have a lawyers standing by them," the mayor said from City Hall. "They'll never have to stand alone in a court of law to defend their basic rights."

The $12 million announced Monday will go towards anti-eviction services managed by the Human Resources Administration, which in total will receive $25.8 million to help keep New Yorkers in their homes.

The mayor's office estimates 19,000 households — largely in communities with the highest number of New Yorkers entering shelters – will benefit from those services.

Those neighborhoods include: Bedford Stuyvesant, Bushwick, Crown Heights in Brooklyn; Central and West Harlem in Manhattan; Jamaica and South Jamaica in Queens; Tremont and Williamsbridge in the Bronx; and Port Richmond and Mariner's Harbor in Staten Island.

Another $20.5 million is currently slated to help prevent tenant harassment in neighborhoods slated for rezoning under de Blasio's affordable housing plan.