Updated

In a closely watched case, the California Supreme Court on Thursday ruled that a man living in the United States illegally who graduated from law school and passed the state bar exam may obtain a license to practice his craft.

The ruling involves Sergio Garcia, who challenged a 1996 law that bars people living in the country illegally from receiving "professional licenses" from government agencies, or with the use of public funds, unless state lawmakers vote otherwise.

"Garcia initially was brought to California by his parents as a very young child," the court ruling said, "and has gone to college, completed law school, and has successfully passed the bar examination in California. He has been a diligent and trusted worker and has made significant contributions to his community. He has never been convicted of a criminal offense."

"No individual raised any concern with respect to Garcia's moral fitness," the judges continued. "Numerous individuals who worked with, taught, and participated in community activities with Garcia over many years had nothing but the highest praise for the applicant. For example, an attorney for whom Garcia worked as an unpaid intern during law school stated that 'I know with absolute certainty that Mr. Garcia [is] among the most honest, forthright, and moral individuals that I have ever met.'"

The case has pitted the Obama administration, who opposes licensing Garcia, against state officials who have supported him.

The Obama position in the case came as a surprise to some, since it adopted a program that shields from deportation people who were brought to the U.S. as children, graduated high school and have kept a clean criminal record.

At a hearing in September, a majority of the court's justices appeared reluctant to grant Garcia the license, saying the law prohibits them from doing so unless the Legislature acts.

The state supreme court is in charge of licensing attorneys in California.

Shortly after the ruling, Garcia said on his Facebook page: "With tears in my eyes I'm happy to report I am being admitted to the bar, thank God! This one is for all of you who dare to dream and by doing so change the world! Love you all! History was made today!"

Lawyers for the federal government had argued that Garcia should be barred from receiving his license because the court's budget is funded by public money.

But Garcia, who arrived in the U.S. illegally 20 years ago to pick almonds with his father, has said his case is about showing other immigrants that hard work and dedication mean something in the U.S.

The Thursday ruling said: "The most directly applicable federal statute — section 1621 — expressly authorizes a state, through a sufficiently explicit statute, to permit undocumented immigrants to obtain a professional license, notwithstanding the limitations on employment imposed by other federal statutes. No federal statute precludes a state from issuing a law license to an undocumented immigrant."

Garcia, 36, worked in the fields and at a grocery store before attending community college. He became a paralegal, went to law school and passed the bar on his first try. He applied for citizenship in 1994, and is still working toward that goal.

His effort was supported by State Bar officials and California's attorney general, who argued that citizenship status is not a requirement to receive a California law license.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino