A state appeals court says the University of California Board of Regents acted legally in allowing unauthorized immigrants living in the state to pay the same tuition levels as other residents and to get financial aid.

State lawmakers had voted in 2001 to grant in-state tuition to all students, regardless of immigration status, at all of California’s public colleges and universities. But because of UC’s independent status under the state Constitution, the legislation applied only to fees at California State University and community college campuses.

The regents, UC’s governing body, then voted to take the same step for students at their campuses who had attended high school in California and had applied to legalize their immigration status.

Fewer than 1 percent of the students at all three institutions were unauthorized immigrants eligible for those lower costs, according to a legislative staff report. At UC, students from California currently pay $12,294 in tuition and fees, while out-of-state students pay $38,976.

The regents took the same steps after lawmakers approved measures in 2011 and 2014 to make unauthorized immigrants eligible for state financial aid and loan programs.

The actions were challenged by a taxpayer represented by the conservative nonprofit Judicial Watch. The suit relied on a 1996 federal law that made unauthorized immigrants ineligible for state and local benefits unless they were expressly authorized by a future state law. The regents are not legislators and have no power to enact state laws, Judicial Watch argued.

But the Second District Court of Appeal in Los Angeles ruled Friday that the legislation in 2001, 2011 and 2014 had explicitly made UC students eligible for in-state tuition and benefits, allowing the regents to take the final step.

The 1996 law “requires only that state laws make undocumented immigrants eligible for public benefits,” Justice John Segal said in the 3-0 ruling, which upheld a Superior Court judge’s decision. Segal said the Legislature “removed the federal barrier to making undocumented immigrants eligible for the exemption from nonresident tuition, and the regents conferred that benefit on qualified UC students.”

UC spokesman Ricardo Vazquez said the ruling “recognizes that the Legislature and the regents have done everything necessary to extend these benefits.”

Attorneys with Judicial Watch could not be reached for comment.

Bob Egelko is a San Francisco Chronicle staff writer. Email: begelko@sfchronicle.com Twitter: @egelko