(Reuters) - New York Governor Andrew Cuomo signed an executive order on Sunday requiring local officials throughout the state to force the homeless into shelters when temperatures dip below freezing and vowed to defend the edict if challenged in court.

Slideshow ( 11 images )

The order, which takes effect on Tuesday, requires social service agencies and police to move homeless individuals into shelters, against their will if necessary, when the temperature is at or below 32 degrees Fahrenheit (O degrees Celsius).

“Our state, which has a beautiful tradition of social progress and community, should not leave anyone outside in freezing temperatures. That’s called basic humanity,” Cuomo said during an interview on New York City news channel NY1.

New York and other big U.S. cities have long wrestled with the dilemma of dealing with homeless people who refuse to be taken to shelters, even in the most bitter cold. Many of them fear falling victim to crime in the shelters.

The order also requires shelters to extend hours of operation to ensure that homeless people can stay inside whenever there is “inclement winter weather which can cause hypothermia, serious injury and death.”

Municipalities throughout the state currently employ a wide range of policies to address homelessness. According to the order, state law allows for the involuntary placement of homeless individuals so they do not harm themselves or others.

Officials at the Coalition for the Homeless advocacy group in New York City could not be immediately reached for comment.

New York City Mayor Bill de Blasio’s office said it supported the intent of the order, but added that Cuomo will need to pass a law to force homeless individuals into shelters, according to a statement given to the New York Times.

Cuomo said during an interview with news radio station WCBS-AM that he is prepared to defend the order’s constitutionality in court.

According to the order, more than 77,000 emergency shelter beds are available for homeless single adults, families and unaccompanied youth in the state.

More than 80,000 homeless individuals live in the state, according to a 2015 report by the National Alliance to End Homelessness.

The order said the state will assist local agencies if they lack the necessary resources.