Illegal immigrants injured on the job are entitled to workers’ compensation benefits despite their legal status, a California appeals court ruled.

The 2nd District Court of Appeal ruled in a case involving Torrance, Calif.-based coffee roaster Farmer Bros. Co., which had tried to deny workers’ comp benefits to an employee who was in the country illegally.