San Francisco: A Mexican immigrant without a green card on Thursday won the right to practice law in California, an unprecedented ruling that will permit others in similar circumstances to become lawyers.

The state Supreme Court agreed unanimously that Sergio C. Garcia — who passed the bar examination four years ago — should receive a law licence while awaiting federal approval of his green card application. The court, which has the final word on licensing lawyers, said it was able to approve Garcia’s admission to the State Bar because the Legislature had passed a law last year that cleared the way.

“The fact that an undocumented immigrant’s presence in this country violates federal statutes is not itself a sufficient or persuasive basis for denying undocumented immigrants, as a class, admission to the State Bar,” Chief Justice Tani Cantil-Sakauye wrote for the court.

The ruling was the first of its kind in the country. Decisions in similar cases are pending in New York and Florida, and immigrant-rights advocates predicted the California ruling would ease the way for others seeking a law career.

The Legislature acted after the justices in a September hearing indicated that federal rules required that they deny Garcia, 36, a law licence.

According to a 1996 federal law, states may not award public benefits to immigrants who lack legal status unless legislatures specifically approve exemptions. The state law signed by Gov. Jerry Brown in October provided that exemption for law licences.

James Wagstaffe, who represented the State Bar in its efforts to admit Garcia, called Thursday’s decision “a landmark case in favour of inclusiveness.”

“It is not just about undocumented immigrants,” Wagstaffe said. “It is also saying we are going to decide the qualifications of a lawyer based on individual character, not based on class.”

University of San Francisco law professor Bill Hing estimated that at least two dozen immigrants without green cards graduate from California law schools each year. He said many immigrants were sworn in to practice before the State Bar began asking about immigration status in 2008.

“California now is the only state that has said specifically that undocumented immigrants can practice law,” Hing said. “The hero in this whole saga is the state Legislature and Jerry Brown for acting so swiftly.”

Garcia, a resident of Chico, California, came to the US with his family when he was 17 months old. He returned to Mexico when he was 9 and reentered the US without authorisation when he was 17. His father, an agricultural worker who obtained US citizenship, applied for a green card for his son in 1994. The federal government accepted the petition in 1995, but Garcia is still waiting for the card.

Under federal rules, the number of visas issued each year is limited and based on an immigrant’s native country. Garcia has had to wait in line behind a large backlog from Mexico. The court said it may take Garcia at least two years and “perhaps many more” to be scheduled for a visa interview.

Garcia graduated from a California high school, attended Butte College, Cal State Chico and Cal Northern School of Law. He received his law degree in May 2009 and passed the California bar examination that same year. He has been working as a motivational speaker.

In its ruling, the court said there was no disputing that Garcia could practice law free of charge and outside the US. But, the justices noted, there was disagreement about whether someone like Garcia legally could work as an independent contractor and charge fees.

The US Justice Department has said that would not be allowed. The State Bar has said it was permissible. The court did not rule on the question on Thursday.