Ajit Pai, chairman of the Federal Communications Commission, speaks after the FCC voted in December 2017 to repeal the government's net neutrality rules. (Jacquelyn Martin/AP)

The Federal Communications Commission told a federal court on Thursday that it acted properly when it repealed the U.S. government’s net neutrality rules in 2017, marking its first legal salvo in a campaign to battle 22 states and tech companies including Mozilla, Facebook and Google that contend the agency’s move was illegal.

Under President Trump, the FCC voted last December to undo rules that required Internet providers such as AT&T and Comcast to treat all Web traffic equally. To the agency’s Republican leader, Chairman Ajit Pai, his Democratic predecessors had erred in how they implemented net neutrality by treating broadband providers similar to old-school telephone utilities.

In the FCC’s new filing with the U.S. Court of Appeals for the District of Columbia Circuit, the agency said Thursday it was perfectly within its right to rethink how it regulated those entities, citing a landmark Supreme Court decision from 2005 outlining the agency’s powers. The FCC said its evidence showed the Obama-era net neutrality rules had stifled investment in broadband expansion, justifying the decision to wipe the protections off its books.

“The [FCC] accordingly adopted a light-touch approach that relies on transparency, market forces, and enforcement of existing antitrust and consumer protection laws to protect against harmful conduct,” the FCC said in the brief, which also included the Justice Department.

From here, the FCC’s filing sets the stage for what is universally expected to be a protracted and heated legal battle over the government’s ability to regulate the Internet. State attorneys general, consumer advocates and top tech companies have sharply rebuked the FCC’s rationale for eliminating net neutrality rules — pointing to the millions of web users who wrote the agency in defense of those federal protections — while telecom giants have backed the Trump administration’s move.

Their war could be destined for the Supreme Court. If that happens, experts are closely watching the court’s newest justice, Brett M. Kavanaugh, who questioned the FCC’s authority to adopt sweeping net neutrality protections as part of a dissent he wrote in a related case in 2017.

At the heart of the fight is how, exactly, the government characterizes broadband Internet access provided by telecom giants such as AT&T, Comcast, Charter and Verizon.

In 2015, the FCC under President Barack Obama opted to treat those Internet providers, known as ISPs, as telecommunications services, a change in language that also carried broad legal ramifications. Telecom historically has been more heavily regulated, and the FCC has the ability to police everything from the way companies price phone service to the privacy protections they afford users.

The agency’s Democratic chiefs, however, said at the time that they made the change because it was the only way to adopt tough net neutrality rules that also could survive court scrutiny. The rules prohibited companies such as AT&T and Verizon from favoring their own music, movies or other content offered by their competitors.

About two years later, with Pai at the FCC’s helm, the agency’s Republicans tossed that approach — choosing to return Internet service providers to their older classification as “information services,” which are less regulated. Defending that move to a D.C. court, the FCC on Thursday pointed to a Supreme Court decision from 2005, known to many as Brand X, which affirmed the nation’s top telecom agency had great deference to determine how to regulate a fast-changing industry under its decades-old, ambiguous guiding laws.

In making those arguments, the FCC faces staunch opposition from states such as New York and California and tech companies including Mozilla, the maker of the Firefox Web browser. In their lawsuit challenging the Trump administration, filed earlier this year, open Internet advocates painted a much different picture: They said the FCC’s repeal had been “arbitrary” and “capricious,” disregarded how broadband actually worked and lacked evidence to show telecom investment had been curtailed. Net neutrality advocates said ISPs “have abused and will abuse their gatekeeper roles in ways that harm consumers and threaten public safety.”

The fight against Pai’s repeal also has the support of tech giants such as Amazon, Facebook, Google and Twitter, which filed their own brief with the D.C. court in August under the banner of their lobbying groups, including the Internet Association.

“You can change your mind, but you have to show good reason why you changed your mind,” said Gigi Sohn, a top adviser at the FCC when it implemented the since-repealed rules. “And to the extent that their whole argument was based on this nonsense that ISPs have invested less, that was completely shown to be false.”

For now, the FCC requires Internet providers to be transparent about how they manage their networks — and it leaves it to another agency, the Federal Trade Commission, to ensure the telecom industry isn’t acting anti-competitively. FCC lawyers defended that arrangement in the filing, stressing Thursday that a mix of heightened disclosure, antitrust laws and market forces would protect net neutrality while sparing businesses from harm.

The FCC told the D.C. appeals court to uphold its prohibition on states from adopting their own net neutrality rules. The move has enraged net neutrality advocates, but it has not deterred them: California forged ahead, adopting a law of its own and triggering a lawsuit from the Justice Department earlier this month.