His legal fight to become a lawyer lasted three years. This week, Cesar Vargas, a Mexican-born 31-year-old New Yorker, became the first immigrant in the state without legal status to be approved to work as a lawyer.

An appellate panel of the State Supreme Court approved his application to the bar on Wednesday, overturning a 2013 decision by a committee that had denied his application based on his immigration status but had asked the court to rule.

In its decision, the state judiciary did what the Legislature in Albany has not been able to do: establish at least a modicum of immigration policy change.

The decision could be a test case, not only for the city, but also for the country, affecting hundreds of would-be lawyers and empowering immigrants who arrived as children to the United States and have been granted a reprieve from deportation.