New York Gov. Kathy Hochul is supporting the city's effort to suspend a unique legal agreement that requires it to provide emergency housing to homeless people, as a large influx of migrants overwhelms the city's shelter system.

Hochul endorsed New York City's challenge to the requirement in a court filing this week, telling reporters Thursday that the mandate was never meant to apply to an international humanitarian crisis.

The city has for months sought to roll back the so-called right to shelter rule following the arrival of more than 120,000 migrants since last year. Many of the migrants have arrived without housing or jobs, forcing the city to erect emergency shelters and provide various government services, with an estimated cost of $12 billion over the next few years.

MIGRANTS DEFY MAYOR ERIC ADAMS' CALLS FOR THEM TO STAY AWAY FROM NEW YORK: 'WE ARE GOOD PEOPLE'

The shelter requirement has been in place for more than four decades in New York City, following a legal agreement that required the city to provide temporary housing for every homeless person. No other big city in America has such a requirement.

Hochul and Adams

New York Governor Kathy Hochul speaks alongside New York City Mayor Eric Adams at the High Intensity Drug Trafficking Areas (HIDTA) office on August 24, 2022 in New York City. (Photo by John Lamparski/Getty Images)

"I don't know how the right to shelter — dedicated to help those people, which I believe in, help families — can or should be interpreted to be an open invitation to 8 billion people who live on this planet, that if you show up in the streets of New York, that the city of New York has an obligation to provide you with a hotel room or shelter," said Hochul, a Democrat.

ERIC ADAMS SLAMS BIDEN FOR NOT MEETING, IGNORING MIGRANT CRISIS ON NYC VISIT: 'EVERYBODY KNOWS WHERE I AM'

Last week, New York City Mayor Eric Adams asked a court to allow it to suspend the mandate when there is a state of emergency where the shelter population of single adults increases at a rapid rate. New York state on Wednesday filed a court document in support of the city's request, calling it reasonable.

New York City has also tightened shelter rules by limiting adult migrants to just 30 days in city-run facilities amid overcrowding.

Dave Giffen, executive director of the Coalition for the Homeless, said the city's request to suspend the mandate would have broad impact and could lead to large homeless encampments in New York.

CLICK HERE TO GET THE FOX NEWS APP

"Make no mistake: if the mayor and governor get their way, they will be closing the door of the shelter system to thousands of people without homes, leaving them nowhere to sleep but the streets," he said.