WASHINGTON — The Federal Communications Commission could dump rules that keep internet providers from favoring some services over others, but couldn’t bar states like California from enacting their own prohibitions, a federal court ruled.

While Tuesday’s ruling handed Trump-appointed regulators a partial victory, consumer advocates and other groups viewed the ruling as a victory for states and local governments seeking to put in their own net neutrality rules.

The FCC’s 2015 net neutrality rules had barred internet providers such as AT&T, Comcast and Verizon from blocking, slowing down or charging internet companies to favor some sites or apps over others.

After the FCC repealed the rules, phone and cable companies are permitted to slow down or block services they don’t like or happen to be in competition with. Companies could also charge higher fees of rivals and make them pay for higher transmission speeds.

Such things have happened before. In 2007, for example, The Associated Press found that Comcast was blocking or throttling some file-sharing. And AT&T blocked Skype and other internet calling services on the iPhone until 2009.

The court now says that’s all permissible — as long as companies disclose it.

But in Tuesday’s decision, the U.S. Court of Appeals for the District of Columbia Circuit ruled that the FCC failed to show legal authority to bar states from imposing any rules that the agency repealed or that are stricter than its own.

“This ruling empowers states to move forward in the absence of a federal approach to consumer protections,” said Lisa Hayes, co-CEO of the Center for Democracy & Technology.

States already have come up with their own net neutrality laws, including one in California that was put on hold until Tuesday’s court decision. Congressional Democrats have attempted, unsuccessfully, to reverse the FCC’s repeal.

The federal court directed the FCC to rework its order to include the impact of its repeal on public safety. FCC Chairman Ajit Pai said the agency will address the “narrow issues” cited by the court.

“Today’s decision is a victory for consumers, broadband deployment, and the free and open internet,” Pai said in a statement. He maintained that speeds for consumers have increased by 40% since the agency’s 2017 repeal “and millions more Americans have gained access to the internet.”

Net neutrality has evolved from a technical concept into a politically charged issue, the focus of street and online protests and a campaign issue lobbed against Republicans and the Trump administration.

The FCC has long mulled over how to enforce it. The agency had twice lost in court over net-neutrality standards before a Democrat-led commission in 2015 voted in a regime that made internet service a utility, bringing phone and cable companies under stricter oversight. An appeals court sanctioned the 2015 rules.

After the 2016 election, President Donald Trump appointed a more industry-friendly FCC chairman. Pai repealed the net neutrality rules in 2017, saying they had undermined investment in broadband networks.