RICHMOND, Va. (CN) – The Fourth Circuit upheld an injunction Tuesday blocking South Carolina’s attempt to pull Medicaid funding from Planned Parenthood because its clinics provide abortions.

South Carolina Governor Henry McMaster, a Republican, signed an executive order last year that barred Planned Parenthood from obtaining Medicaid reimbursements for family planning and other health services it provides to hundreds of women, men and teens at clinics in Charleston and Columbia.

But a federal judge blocked the executive order in August 2018 and a unanimous Fourth Circuit panel affirmed that decision Tuesday afternoon.

U.S. Circuit Judge Harvie Wilkinson, a Ronald Reagan appointee, was joined in his opinion by U.S. Circuit Judges Julius Richardson, appointed by President Donald Trump, and James Wynn, a Barack Obama appointee.

Citing U.S. Supreme Court precedent and the Medicaid Act’s free-choice-of-provider provision, Wilkinson wrote that “an injury so concrete and a right so clear is something that the courts must respect.”

“Reasonable people can disagree with how Congress chose to balance state flexibility on the one hand, and enforcement of federal entitlements on the other,” the ruling states. “But in all events federal courts are ill-suited to second-guess this act of political judgment in the Medicaid Act.”

Planned Parenthood South Atlantic and patient Julie Edwards sued the state soon after McMaster issued his order.

Tuesday’s opinion upholds the ruling handed down by U.S. District Judge Mary Geiger Lewis, which said states cannot exercise their discretion to exclude health care providers from Medicaid programs for reasons unrelated to any potential inability to perform services covered by the joint federal and state program.

Lewis, an Obama appointee, issued a preliminary injunction that allowed Planned Parenthood’s two clinics in South Carolina to continue accepting patients who rely on Medicaid assistance.

South Carolina contends that the Medicaid Act’s unclear definition of “qualified” in relation to health care providers allows states to exclude them for any reason established by law. It pointed to a 2017 Eight Circuit ruling that said patients’ right to choose their medical provider was “ambiguous.”

But the Fourth Circuit found that Edward’s right to sue over Planned Parenthood’s exclusion from the state’s Medicaid roster is not ambiguous.

“Congress unambiguously intended to create a private right – in favor of ‘any individual’ receiving Medicaid assistance – in the free-choice-of-provider provision,” the ruling states.

As noted in the Fourth Circuit’s ruling, the district court found that the state’s Medicaid reimbursement of Planned Parenthood South Atlantic on a fee-for-service basis guards against indirect subsidization of abortion— shooting down a reason McMaster had cited for issuing his executive order.

Planned Parenthood applauded the ruling, saying federal law “prohibits states from interfering with Medicaid patients’ access to the qualified provider of their choice.”

“Governor McMaster should take heed of the court’s decision and focus on improving health outcomes for women in South Carolina rather than attempting to create more barriers to accessing health care,” Jenny Black, CEO of Planned Parenthood South Atlantic, said in a statement Tuesday.

Planned Parenthood said the two South Carolina locations are in areas with previously recognized shortages of health care providers, and that its clinics’ flexible hours are helpful to those who require Medicaid assistance.