ALBANY, N.Y. — New York Governor Kathy Hochul on Thursday announced she had reached an agreement with legislative leaders to embed sweeping immigration enforcement restrictions into the state budget, directly countering a threat from President Donald Trump’s border czar to surge federal agents into the state if it moved to limit cooperation with U.S. Immigration and Customs Enforcement.

Hochul, a Democrat, said the budget provisions — which are not yet finalized — would bar state and local law enforcement agencies from entering into agreements with ICE or acting as civil immigration agents, deny ICE agents access to sensitive locations such as schools and hospitals without a judicial warrant, ban law enforcement officers from wearing masks while on duty, and establish a pathway for individuals to sue ICE officers.

“I don’t take well to threats,” Hochul told reporters. “We’re going to pass what we think is important to protect New Yorkers.”

The governor’s announcement came two days after Tom Homan, appointed as Trump’s border czar, told Fox News that his agency would “flood the zone” with agents if the state pressed forward. “Of course we’re going to increase manpower, a lot,” Homan said. “They can put up all the roadblocks they want, but we’re going to do this job.”

Hochul and Homan met privately at the New York state Capitol earlier this year. According to the governor, Homan told her during that meeting “the era of the surges is over” — a claim that contrasts with his subsequent public warnings.

The governor insisted the measures would not obstruct New York’s cooperation with federal authorities in criminal cases. “This does not restrict our ability to help in criminal situations,” she said, adding that the state would “help you go after the hardened criminals, the violent, the worst of the worst.” But she declared that broader enforcement had “gone too far.”

The proposals are the latest instance of a Democratic-led state seeking to place guardrails around the Trump administration’s immigration crackdown, which has been marked by high-profile, sometimes violent deportation operations. By embedding the restrictions in the state budget, Hochul and legislative leaders aim to secure their passage as part of must-pass fiscal legislation.

Bruce Blakeman, a Republican candidate for governor, criticized the measures on Thursday, pointing to his Long Island county’s existing cooperation agreement with ICE as a model. He said the partnership has succeeded in removing “bad people out of our community” and produced orderly enforcement, and he argued that the proposed state-level restrictions would undermine that work.