New York City will spend $12.3 million to expand a program providing legal aid to low-income tenants facing eviction at the hands of "unscrupulous landlords," Mayor Bill de Blasio announced Monday.

He called the initiative an effort to prevent homelessness, saying free legal representation can help families fight harassment and eviction and stay in their homes.

"They will have a guardian. They will have a lawyer standing by them," de Blasio said at a City Hall news conference. "People in many cases are on the brink and they need to know that help is there."

The city will target 15 neighborhoods where people are most likely to enter the homeless shelter system, including booming real estate markets such as Bedford-Stuyvesant, Bushwick and Crown Heights in Brooklyn and Central and West Harlem in Manhattan.

Each time a tenant is pushed out of their home, an affordable-housing unit is at risk of being converted to market-rate housing, city officials said, though they were careful Monday not to label such turnover as the effects of gentrification.

Manhattan Borough President Gale Brewer urged tenants being offered buyouts, "Don't take the money to move out."

advertisement | advertise on newsday

"Short-term gain, long-term pain," de Blasio said, condemning landlords who "take advantage of real estate values and push people out."

The city has a separate initiative to protect tenants from landlord harassment in neighborhoods that have been designated for rezoning.

The two legal service programs will have a budget of $61.8 million in the next fiscal year -- 10 times what was spent in fiscal year 2013, the mayor's office said. About 32,700 households will be helped annually.

More than 58,000 people are sleeping in city shelters each night, according to the nonprofit Coalition for the Homeless. The number has increased steadily since the city's Advantage rent subsidy program was cut in 2011. The city Department of Homeless Services said more than 3,000 people are "street homeless."

Adriene Holder, of the nonprofit Legal Aid Society, said the anti-eviction program and others like it are "about stabilizing communities and keeping people in place."