The future of how the internet is regulated could be decided in court.

The attorneys general of more than 20 states filed a lawsuit on Tuesday to stop the Federal Communications Commission's decision to repeal Obama-era net neutrality protections.

"The repeal of net neutrality would turn internet service providers into gatekeepers -- allowing them to put profits over consumers while controlling what we see, what we do, and what we say online," New York Attorney General Eric Schneiderman said in a statement announcing the lawsuit.

First approved by the FCC in 2015, the net neutrality rules require internet service providers like Comcast (CCZ) and Verizon (VZ) to treat all online content the same. Providers are barred from deliberately speeding up or slowing down traffic from specific websites, and from putting their own content at an advantage over rivals.

The Republican-led FCC voted to overturn the rules last month. Ajit Pai, the FCC chairman appointed by President Trump, pitched the repeal as a way stop the federal government from "micromanaging the internet."

Related: Trump's FCC moves quickly to upend internet, media rules

The FCC's decision to overturn these protections has been championed by the telecom industry, but widely criticized by technology companies and consumer advocacy groups.

In a sign that criticism of the rules goes beyond party lines, the coalition of attorneys general joining Tuesday's lawsuit represent both red and blue states. The list includes California, Mississippi, Kentucky, Maine and North Carolina, among others.

A spokeswoman for the FCC declined to comment on the lawsuit.

The potential for a legal showdown comes as federal and state lawmakers are looking for legislative solutions.

Sen. Ed Markey, a Democrat representing Massachusetts, announced Tuesday that 50 senators have now signed on to a resolution that would overrule the FCC decision and restore the net neutrality rules. It would only need one more senator to pass.

The resolution would then need to be approved by the House of Representatives, which could be more of an uphill battle. Rep. Mike Doyle, a Democrat representing Pennsylvania, said Tuesday he has 81 members of Congress willing to cosponsor legislation to protect net neutrality. Traditionally, a bill needs 218 votes to pass in the House.

Even if Congress approves it, Trump would need to sign off. The White House has repeatedly supported the FCC's net neutrality repeal.

Lawmakers in states like New York, Washington and Massachusetts have also proposed bills in recent weeks to enforce the principles of net neutrality within their borders.