The nation’s largest state adopted sweeping net neutrality protections, setting up a legal showdown with the federal government over the future of the internet. California Governor Jerry Brown Sunday signed a bill banning broadband providers such as AT&T and Comcast from blocking, throttling, or otherwise discriminating against lawful content passing through their networks. Almost immediately, the Justice Department filed suit to block the law.

The California law would restore Obama-era protections the Federal Communications Commission voted to jettison last December, and in some cases, go further. For example, the California law bans broadband providers from exempting their own content from data caps while charging for data used by competitors. That will affect AT&T's practice of exempting its DirecTV streaming video service from its mobile customers' data limits but not data used by Dish's Sling TV service, and other similar arrangements. The old FCC rules, by contrast, allowed the commission to investigate such deals on a case-by-case basis.

“Today marks a true win for the internet and for an open society,” said state Senator Scott Wiener, the sponsor of the California bill, in a statement.

California is the second state to adopt its own net neutrality rules, following Washington. The Washington law is less comprehensive than the California law, because it doesn’t cover data caps, and may include loopholes that in some cases would let broadband providers create so-called fast and slow lanes on the internet. Other states, including Hawaii, Montana, and Oregon have adopted laws or executive orders that ban state agencies from doing business with internet providers that violate the principles of net neutrality.

But the Justice Department sought to block the California law, arguing that is was pre-empted both by FCC rules and the Constitution. The FCC order overturning the Obama-era protections includes a section banning states from passing their own net neutrality rules. "“Under the Constitution, states do not regulate interstate commerce—the federal government does," Attorney General Jeff Sessions said in a statement. "Not only is California’s Internet regulation law illegal, it also hurts consumers," said FCC Chair Ajit Pai.

In a speech at the Maine Heritage Policy Center this month, Pai said, "Broadband is an interstate service; Internet traffic doesn’t recognize state lines."

LEARN MORE The WIRED Guide to Net Neutrality

Defenders of the California law said they hope to prevail, because the FCC essentially abandoned regulation of broadband when it repealed the Obama-era rules. Chris Lewis, vice president of Public Knowledge, a public-interest advocacy group, said it is disingenuous for the FCC to decline to regulate internet providers, but then block states for trying to do so. "The FCC has abdicated its authority over broadband and here is a state stepping up to fill the void," he said.

Legal experts have said it's not clear whether the FCC has the authority to preempt the states. In 2007, a federal court ruled that the FCC could stop Minnesota from treating internet phone services like Vonage the same way it regulates traditional landline phone services. Net neutrality advocates, meanwhile, point to a 2016 federal court ruling that the Obama-era FCC didn't have the authority to preempt certain state laws concerning municipal broadband. But Marc Martin, a former FCC staffer during the presidency of George H.W. Bush who is chair of law firm Perkins Coie's communications practice, told WIRED earlier this year that neither case is an apples-to-apples comparison to the fight over net neutrality.

The adoption of state laws, particularly in California, will increase pressure on Congress to deal with the issue. Several lawmakers have introduced bills they’ve described as protecting net neutrality, though some would still leave telecom providers free to favor certain types of traffic over other types. In May, the Senate passed legislation that would restore the FCC's Obama-era rules, but the House has yet to schedule a vote on the issue.