ALBANY – Wild boars beware: New York wants you to leave the state, one way or the other.

Gov. Andrew M. Cuomo Tuesday signed a bill into law that makes it illegal to possess Eurasian boars and or hybrids, which state officials say could, in a matter of years, pose widespread danger to farm crops, family pets and native species of animals and plants.

Owners of upstate hunting reserves, where boar hunting is offered, said last week that the bill will put them out of business.

But Brian Shapiro, New York state director for The Humane Society of the United States, said the new law will help farmers and native wildlife. “Animals escaping from fenced shooting facilities led directly to the establishment of these wild populations in New York,” he said. “Addressing this issue at its source is the most logical, humane and cost-effective solution.”