SACRAMENTO, Calif. (AP) — California will let college athletes hire agents and make money from endorsements, defying the NCAA and setting up a likely legal challenge that could reshape amateur sports in the U.S.

Democratic Gov. Gavin Newsom announced Monday he signed the law that would let athletes at California universities make money from their images, names or likenesses. The law also bans schools from kicking athletes off the team if they get paid.

I’m so incredibly proud to share this moment with all of you. @gavinnewsom came to The Shop to do something that will change the lives for countless athletes who deserve it! @uninterrupted hosted the formal signing for SB 206 allowing college athletes to responsibly get paid. pic.twitter.com/NZQGg6PY9d — LeBron James (@KingJames) September 30, 2019

The law will take effect on Jan. 1, 2023. It does not apply to community colleges and bans athletes from accepting endorsement deals that conflict with their schools’ existing contracts.

California is the first state to pass such a law.

The NCAA Board of Governors had asked Newsom to veto the bill, saying it “would erase the critical distinction between college and professional athletes.” The board also warned that the law would give California universities an unfair recruiting advantage, which could prompt the NCAA to bar them from competition.

If that happened, powerhouse programs like the University of Southern California, University of California, Los Angeles, Stanford University and the University of California, Berkeley, would be banned from NCAA competition.

But while the NCAA is the top governing body for college sports, membership is voluntary. If the California schools are forced out, it could prompt others to follow and form a new league.

Professional athletes have endorsed the law, including NBA superstar LeBron James, whose 14-year-old son is a closely watched basketball prospect in Los Angeles.

The NCAA has steadfastly refused to pay players. But a committee led by Ohio State Athletic Director Gene Smith and Big East Commissioner Val Ackerman is studying other ways players could make money. The committee’s report is expected in October.

The NCAA does let some athletes accept money in some cases. Tennis players can accept up to $10,000 in prize money per year, and Olympians can accept winnings from their competitions. Plus, schools in the “Power 5” conferences can pay players yearly cost-of-living stipends of between $2,000 and $4,000.

The NCAA reported $1.1 billion in revenue in 2017.