Certain basement apartments in one and two-family homes in East New York will be able to become legal under a city pilot program intended to provide a legal path for a common and affordable form of housing.

A new law to authorize the pilot was signed by Mayor Bill de Blasio on Monday. The legislation creates a three-year initiative overseen by Department of Housing Preservation and Development during which low- to middle-income homeowners of one- to three-family homes in East New York and Cypress Hills can apply for low or no-interest loans to convert their basements and cellars into legal dwellings.

Other homeowners outside of these neighborhoods may also seek legalization on their own, without city funding, according to HPD.

The city will allocate $12 million for HPD to cover program staffing costs, implement and manage the program, along with loan amounts for the construction of 40 homes. The maximum loan per homeowner is $120,000.

“There are thousands of basement apartments in our City, but too many are illegal and unsafe. This program will help New Yorkers secure safe, affordable homes and give homeowners a new legal source of income,” said the mayor in a press release.

Seeking to make basement and cellar conversions easier, the new law revises the city’s building code on minimum ceiling heights — from 8 feet to 7.5 feet — and window sizes in basements, while also tightening the guidelines for emergency exits and fire safety. A basement is defined as a unit that has at least one-half of its height above the curb level, while a cellar has more than one-half of its height below the curb.

The bill was originally sponsored three years ago by Councilmember Brad Lander. However, the campaign to make basement apartments legal in New York goes back more than a decade.

There are an estimated 114,000 basement apartments in New York City, with the majority of them in the outer boroughs, according to a 2008 report by Chhaya, a community development corporation that advocates for housing needs of South Asian New Yorkers, and the Pratt Center for Community Development.

Chhaya began pushing for legislation after seeing a high rate of foreclosures in southern Queens after homeowners bought homes with the intent of renting out basement apartments, only to have them ruled to be illegal by the city, according to William Spisak, the group’s director of programs.

East New York was selected for the pilot program because during the 2016 rezoning of the Brooklyn neighborhood, the suggestion of legalizing basements as a way of stemming the effects of gentrification was raised during community meetings convened by Councilmember Rafael Espinal.

Should the program prove successful and be applied citywide, preliminary estimates suggest legalized basements could contribute an estimated 5,000 affordable housing units, according to a November 2018 City Council report.

“"Finding a path to create safe, legal basement apartments that will add to our city’s affordable housing stock while stabilizing homeowners is an idea whose time has come,” said HPD Commissioner Maria Torres-Springer, in a statement.

“We’d love to see it expand as soon as possible,” Spisak said.

Homeowners in East New York and Cypress Hills can learn more about the program and eligibility requirements by calling 311 or visiting nyc.gov/basementconversion.