A federal court struck down regulations intended to cap the price of some calls to prison inmates, which can cost families thousands of dollars a year.

In a 2-1 decision, the U.S. Court of Appeals for the District of Columbia Circuit found Tuesday that the Federal Communication Commission lacked authority to set rates for calls between inmates and people in the same state.

Companies that provide prison phone service have defended their prices and sued to stop the 2015 FCC rules. The in-state rate caps, intended to stop high charges between inmates and people in the same state, were suspended by earlier court decisions and never went into effect. The FCC does regulate the price of out-of-state calls for prisoners.