SACRAMENTO, Calif. — Defying the NCAA, California's governor signed a first-in-the-nation law Monday that will let college athletes hire agents and make money from endorsements — a move that could upend amateur sports in the U.S. and trigger a legal challenge.

Under the law, which takes effect in 2023, students at public and private universities in the state will be allowed to sign deals with sneaker companies, soft drink makers or other advertisers and profit from their names and likenesses, just like the pros.

Democratic Gov. Gavin Newsom and others cast the law as an attempt to bring more fairness to big-money college sports and let athletes share in the wealth they create for their schools.

"Other college students with a talent, whether it be literature, music, or technological innovation, can monetize their skill and hard work," he said. "Student athletes, however, are prohibited from being compensated while their respective colleges and universities make millions, often at great risk to athletes' health, academics and professional careers."

He predicted other states will introduce similar legislation. Two lawmakers in South Carolina have already announced plans to do so.

The new law applies to all sports, though the big money to be made is in football and basketball. It bars schools from kicking athletes off the team if they get paid. It does not apply to community colleges and prohibits athletes from accepting endorsement deals that conflict with their schools' existing contracts.

The NCAA, which had asked Newsom to veto the bill, responded by saying it will consider its "next steps" while also moving forward with "efforts to make adjustments to NCAA name, image and likeness rules that are both realistic in modern society and tied to higher education."

The NCAA, which has 1,100 member schools and claims nearly a half-million athletes, said that changes are needed but must be done at a national level through the athletic association, not through a patchwork of state laws.

Before the governor signed the bill, the NCAA cautioned that the law would give California universities an unfair recruiting advantage, which could prompt the association to bar them from competition.

Powerhouses like the University of Southern California, UCLA, Stanford and the University of California, Berkeley, could find themselves banned.

But while the NCAA is the top governing body for college sports, membership is voluntary. If the California schools are forced out, they could form a new governing body.

The law represents another instance of California jumping out front of other states and positioning itself in the vanguard of change. The movement to allow college athletes to profit from their achievements on the court or the playing field has been cast as a matter of civil rights and economic fairness.

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 and will be 18 when the measure takes effect.

On Instagram, James exulted over the signing of the measure, saying it will "change the lives for countless athletes who deserve it!"

He added: "NCAA, you got the next move. We can solve this for everyone!"

Democratic state Sen. Nancy Skinner, the bill's author, said it corrects a longtime wrong: "For decades, college sports has generated billions for all involved except the very people most responsible for creating the wealth. That's wrong."

The new law does not go so far as to allow colleges and universities to pay athletes directly for their play.

The NCAA has steadfastly refused to pay players in most cases. 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. Its report is expected in October.

The NCAA does let some athletes accept money in some instances. Tennis players can accept up to $10,000 in prize money per year, and Olympians can accept winnings from their competitions.

Also, many schools pay players yearly cost-of-living stipends of $2,000 to $4,000.

The NCAA reported $1.1 billion in revenue in 2017.