A panel of the U.S. Court of Appeals for the Second Circuit on Monday rejected a lawsuit by Erie County Clerk Michael Kearns claiming that New York’s law allowing undocumented immigrants to obtain driver’s licenses could expose government workers to federal prosecution.

The 26-page opinion from the Manhattan-based appeals court upheld a Rochester federal judge’s ruling that Kearns, who has served in his post since 2017, lacked standing to challenge the state’s so-called Green Light Law because it was unlikely to harm him.