The City Council has adopted a resolution allowing religious groups to hold services in public schools outside school hours.
Dozens of congregations hold weekly worship services in school buildings throughout the city.
The council approved the resolution by a 38-11 vote and is now calling on the state Legislature to make it law statewide.
The Department of Education and the New York Civil Liberties Union think the practice should be abolished.
A lawsuit over this issue has been working through the courts since 1994.
In 2011, a federal court banned religious worship in school buildings, but the U.S. Supreme Court refused to hear the case and the ban was never enforced.
The city is appealing.