LOS ANGELES — California Gov. Jerry Brown signed into law on Sunday a bill to restore net neutrality protections that President Donald Trump's Federal Communications Commission killed late last year.

The new law prohibits internet service providers, or ISPs, from blocking or slowing access to legal online content, demanding special fees from websites to prioritize their traffic or charging customers for special exemptions to caps on their data use.

Brown signed the measure without comment, setting up almost certain showdowns with both ISPs and the FCC, which barred states from setting their own rules in its repeal last December of protections instituted during the administration of President Barack Obama.

The U.S. Justice Department quickly filed a federal action in U.S. District Court in Sacramento to block the new law Sunday night. In a statement, Attorney General Jeff Sessions said: "Under the Constitution, states do not regulate interstate commerce — the federal government does. Once again the California legislature has enacted an extreme and illegal state law attempting to frustrate federal policy."

Earlier this month, Ajit Pai, the former telecommunications industry lawyer whom Trump promoted to chairman of the FCC last year, called the California measure "illegal," describing it as "the most egregious example" of a state's determination to flout the FCC policy.

California Gov. Jerry Brown speaks during a general session at the California Democrats State Convention in March 2014 Jae C. Hong / AP

"Only the federal government can set regulatory policy in this area," Pai said in a speech (PDF) to the Maine Heritage Policy Center, a free-market research institute.

In a statement Sunday night, Pai welcomed the Justice Department response.

"The internet is free and open today, and it will continue to be under the light-touch protections of the FCC's Restoring Internet Freedom Order," he said.

The country's largest cable and internet providers, led by Verizon Communications Inc., AT&T Inc. and Comcast Corp., lobbied strenuously for the FCC's ruling last year. FCC records (PDF) show that Comcast specifically urged the commission to preempt state and local moves to restore the Obama-era policies.

ISPs like Verizon, AT&T and Comcast — the parent company of NBCUniversal and NBC News — say that they don't block or slow down any legal content and that they support an open internet. They have argued, however, that it's unrealistic for them to comply with a patchwork of regulations across the country.

"We all support strong and enforceable net neutrality protections for every American — regardless of where they may live," Jonathan Spalter, president and chief executive of the U.S. Telecom Association, the telecommunications lobby, said by email Sunday night.

"But this bill is neither the way to get there, nor will it help advance the promise and potential of California's innovation DNA," Spalter said. "Rather than 50 states stepping in with their own conflicting open internet solutions, we need Congress to step up with a national framework for the whole internet ecosystem and resolve this issue once and for all."

Fight for the Future, a nonprofit based in Massachusetts that lobbies for an open internet, called the California measure "the strongest and most comprehensive state-level net neutrality bill in the country" and said it hoped California's example would "unleash a wave of similar efforts in other states."

"Despite their army of lobbyists and millions spent lining the pockets of legislators, these companies continue to lose ground in the face of overwhelming cross-partisan opposition to their greedy attacks on our Internet freedom," Evan Greer, the organization's deputy director, said in a statement.

"When all is said and done, Comcast, Verizon and AT&T are going to wish they’d never picked a fight with Internet over net neutrality," she said.