New York state’s requirement that people seeking driver’s licenses verify they are in the United States legally if they lack Social Security numbers does not discriminate against undocumented aliens, a divided state Court of Appeals ruled Thursday.

In Cubas v. Martinez, 74, the court decided in a 5-2 ruling that former Department of Motor Vehicles Commissioner Raymond P. Martinez acted within his authority when he directed in 2002 that people without Social Security numbers must obtain documentation from the U.S. Department of Homeland Security that they are in the country legally while applying for or renewing driver’s licenses. The DMV has continued to enforce the requirement under Governor Eliot Spitzer’s administration.