The decision means Sergio Garcia can begin practicing law despite his immigration status.
"It has been a long, long journey, going on five years, you know," Garcia told CBS News. "I graduated out of law school in May 2009, and here we are in 2014, and we finally -- I have the final piece of the puzzle that will allow me to fulfill my dream and finally become an attorney."
Garcia had challenged a 1996 federal 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.
Shortly after the court heard arguments in the case, California Gov. Jerry Brown signed a state law that authorized the granting of the license. The new law went into effect Jan. 1.
Garcia arrived in the U.S. illegally 20 years ago to pick almonds with his father and worked at a grocery store and in the fields while attending school.
The case has pitted the Obama administration, which 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 people who were brought to the U.S. as children, graduated from high school and have kept a clean criminal record from deportation and allows them to legally work in the country.
At a hearing in September a majority of the state Supreme Court justices appeared reluctant to grant Garcia the license, saying the law prohibits them from doing so unless the Legislature acts.
The court is in charge of licensing attorneys in California.
Lawyers for the federal government argued that Garcia was barred from receiving his license because the court's budget is funded by public money.
But Garcia said his case is about showing other immigrants that hard work and dedication mean something in the U.S.
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 has been 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."The state of California, in general, I have their blessing, and so there's absolutely nothing that prevents me from being a licensed attorney now in California," Garcia told CBS News.