WICHITA, Kan. — An appeals court has overturned a federal judge’s order that forced Kansas to keep funding two family planning clinics despite a state law aimed at stripping a Planned Parenthood chapter of federal money.

At issue in Tuesday’s ruling is money distributed to states under Title X, a federally financed family planning program. A Kansas law requires the state to first allocate the Title X money to public health departments and hospitals, which leaves no funds for specialty family planning clinics like Planned Parenthood.

A lower court had ruled that Kansas couldn’t take the money away from Planned Parenthood.

But a divided federal appeals court in Denver overturned that ruling, rejecting Planned Parenthood’s claims that losing the money amounted to a violation of free-speech rights for associating with abortion providers.