WASHINGTON — A federal court is ruling that the Federal Communications Commission had the right to dump net-neutrality rules, but couldn’t bar states like California from passing their own.

The ruling is largely a victory for FCC Chairman Ajit Pai, a Trump administration appointee.

The 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.

Without these rules, phone and cable companies can interfere with internet traffic as long as they disclose it.

The decision came from the U.S. Court of Appeals for the District of Columbia Circuit.