A federal appeals court has upheld the government’s “net neutrality” rules that require internet providers to treat all web traffic equally.

AT&T said almost immediately that it would appeal the ruling.

U.S. Telecom, the trade group that includes AT&T and Verizon which had sued over the rules, also spoke out against the ruling.

“Two judges on the court have unfortunately failed to recognize the significant legal failings of the Federal Communications Commission’s decision to regulate the internet as a public utility, leaving in place regulation we believe will replace a consumer-driver internet with a government-run internet, threatening investment and innovation in years to come,” said USTelecom President Walter McCormick:

“Our industry strongly supports open internet principles and the FCC’s order is wholly unnecessary to keeping the internet open. We will continue to work toward policies that facilitate America’s broadband leadership, are reviewing the court’s decision, and will be evaluating all of our legal options.”

Advocates for the rules, however, celebrated.

The ruling Tuesday from the U.S. Court of Appeals for the District of Columbia Circuit is a win for the Obama administration, consumer groups and content companies such as Netflix that want to prevent online content from being blocked or channeled into fast and slow lanes.

The rules treat broadband service like a public utility and prevent internet service providers from offering preferential treatment to sites that pay for faster service.

“In 2015, startups, investors, activists, academics, policymakers, and millions of individuals joined together in agreement that net neutrality was vitally important, and that Title II was the best, most legally sound way to do it.” said Holmes Wilson, co-founder of Fight for the Future, an advocacy group. “Now, the courts agree with us too. This victory means that people all over the world can rely on smart policies in the US to protect the Internet as a platform for freedom of expression, economic growth, and social change.”

Providers like Comcast, Verizon and AT&T say the rules threaten innovation and undermine investment in broadband infrastructure.

“We have always expected this issue to be decided by the Supreme Court, and we look forward to participating in that appeal,” said David McAtee, AT&T Senior Executive Vice President and General Counsel.