[What you need to know to start the day: Get New York Today in your inbox.]

HOMER, N.Y. — The fears weigh on Mike McMahon: If one of his undocumented workers gets a traffic ticket, it could prompt an immigration audit of his entire farm. If another gets detained by immigration agents at a roadside checkpoint or in a supermarket parking lot, the rest may flee. And if his undocumented work force disappears overnight, there is no one to replace them.

“It keeps me up at night,” said Mr. McMahon, who owns a dairy farm south of Syracuse. “There are people out there who just say, ‘Send them all back and build a wall.’ But they would be facing empty shelves in the grocery store if that were to happen.”

It has long been an open secret in upstate New York that the dairy industry has been able to survive only by relying on undocumented immigrants for its work force. Now, this region has become a national focal point in the debate over President Trump’s crackdown on undocumented immigrants and their role in agriculture.

The tensions have escalated to such a degree over the last year that Gov. Andrew M. Cuomo described federal agents as reckless, accusing Immigration and Customs Enforcement of violating the rights of farmers in pursuing undocumented immigrants.