Gov. Kathy Hochul, in a statewide address, reiterated her argument that the state constitution’s requirement to provide shelter is limited to the city.

The attorney who filed the 1979 case that created the right-to-shelter mandate said it applies statewide.

Mayor Eric Adams is seeking to weaken the right-to-shelter decree.

In her address to the state on sheltering migrants, Hochul, once again, stressed that New York City’s obligation to provide shelter to anyone who seeks it — stops at the city’s borders.

“This is an agreement that does not apply to state’s other 57 counties,” she said.

But attorney Robert Hayes sees it differently. In 1979, his suit against Gov. Hugh Carey and Mayor Ed Koch resulted in a 1981 consent decree with the city that became known as right-to-shelter.

“If the governor doesn’t think there’s a statewide right-to-shelter, she’s very, either very ill-informed or frankly derelict in her obligation,” Hayes said.

Hayes filed a class action on behalf of New York City’s homeless men.

The winning legal argument was based on a line in the state constitution that says “the aid, care and support of the needy are public concerns and shall be provided by the state” and localities.

“Could mean a lot. At a bare minimum, we argued successfully that it had to mean a roof over someone’s head,” Hayes said.

And a judge granted an injunction, ordering the city and state to provide that roof. The trial continued.

“It was going well and finally at a lunch break, after the court said some favorable things to the plaintiffs’ case, the city and state came back and said, let’s see if we can work out a consent decree,” Hayes said.

Hayes also scored legal victories on sheltering homeless people elsewhere in the state.

Now, Adams, like some of his predecessors at City Hall, is trying to change that decree as city officials struggle to find shelter for thousands of migrants here.

The city, under the proposed change filed in court, would be able to skirt its obligation if the city is unable to provide “sufficient shelter sites, staffing and security to provide safe and appropriate shelter.”

Former city homeless services commissioner Steve Banks is co-counsel with The Legal Aid Society on this case. He said Wednesday after a court hearing that migrants should get help through resettlement.

“It’s not a winning strategy to try to suspend the right to shelter,” Banks said Wednesday.

Civil Rights attorney Norman Siegel called Adams’ legal effort a tactical mistake, and should have tried to clearly establish a statewide right-to-shelter.

“We now have said, no, Mr. Mayor and your administration, don’t be timid. Take this issue on,” Siegel said. “This is the right moment.”

The parties are due back in court Sept. 18.