A modified executive order issued Wednesday by Gov. Andrew Cuomo blocks state agencies and officers from inquiring about a person’s immigration status — a move that dovetails with the state calling on Immigration and Customs Enforcement to stop “reckless and unconstitutional” enforcement actions in the state.

At the same time, Cuomo did not rule out legal action against the federal government. ICE agents in recent weeks have stepped up immigration enforcement around the country, including areas in New York state.

“The reckless and unconstitutional practices ICE is deploying in our communities violate everything we believe in New York and are an assault on our democracy,” Cuomo said. “I demand ICE immediately cease and desist this pattern of conduct, and if they fail to do so, I will pursue all available legal recourse and commit to doing everything in my power to protect the rights and safety of all New Yorkers. In New York, where Lady Liberty holds her torch high, we will defend our democracy and protect the rights and safety of all New Yorkers.”

The order issued by Cuomo on Wednesday is a modification of a previous order, blocking ICE arrests in state facilities without a warrant.

A bill that would declare New York a “sanctuary” state has been a difficult ask in the state Legislature, with the measure passing by a narrow majority in the otherwise Democratic-dominated Assembly and unlikely to come to a vote in the Republican-controlled Senate.