Image copyright AP

The California Supreme Court has posthumously awarded a law licence to a Chinese immigrant who was barred from becoming a lawyer 125 years ago.

Hong Yen Chang was barred from practising law in 1890 by the same court because "persons of the Mongolian race" were not granted citizenship.

In a nine-page ruling, the court said its earlier decision was "discredited".

Campaigners have worked since 2011 to have the licence granted to Chang, the country's first Chinese lawyer.

"We grant Hong Yen Chan posthumous admission as an attorney and counselor at law in all courts of the State of California," reads the first sentence of the decision, which has been published by local radio station KQED.

"More than a century later, the legal and policy underpinnings of our 1890 decision have been discredited," the court said.

Chang came to the United States in 1872. He earned an undergraduate degree from Yale in 1879, and a law degree from Columbia Law School in 1886.

A year after graduating from law school, New York state blocked Chang from practising law, citing the fact that he was not a citizen.

After a judge made him a naturalised citizen and the state legislature passed a law allowing him to reapply, he was admitted to the New York bar as the first Chinese lawyer in the United States, the Los Angeles Times reported.

Later, Chang moved to California with the desire to serve the large community of Chinese people in San Francisco.

It was there, in 1890, that the state's supreme court said his naturalisation violated immigration law and that he would not be eligible for a law licence.

After the denial, Chang became a diplomat and banker, and those immigration laws have since been repealed.

That decision is "notorious among Asian American legal scholars," Gabriel Chin, a law professor who has led the charge to have Chang recognised, told the Los Angeles Times.

A breakthrough came when the California Supreme Court granted an undocumented Mexican migrant a law licence in 2014.

"Even if we cannot undo history, we can acknowledge it and, in so doing, accord a full measure of recognition to Chang's path-breaking efforts to become the first lawyer of Chinese descent in the United States," the court wrote in its decision on Monday.