(Reuters) - A federal judge on Wednesday overturned the Trump administration’s approval of plans by Kentucky and Arkansas to impose work requirements on people seeking Medicaid health insurance benefits.

U.S. District Judge James Boasberg ruled that the Department of Health and Human Services had failed to adequately consider the extent to which the Republican-led states’ plans would cause significant numbers of people to lose coverage.

The decisions came in separate lawsuits by Kentucky and Arkansas residents enrolled in Medicaid. It marked a setback for efforts by President Donald Trump’s administration to scale back the joint federal-and-state healthcare program.

“The court reaffirmed the rights of financially insecure individuals to access health care,” said Sam Brooke, a lawyer for the plaintiffs at the Southern Poverty Law Center.

But Adam Meier of the Kentucky Cabinet for Health and Family Services called the ruling “illogical” because it did not take into account whether the state’s program was actually helping enrollees.

“Although a setback to our implementation schedule, we believe that we have an excellent record for appeal and are currently considering next steps,” Meier said in a statement.

Arkansas Governor Asa Hutchinson, a Republican, said in a separate statement he was disappointed by the ruling. Representatives for HHS did not respond to requests for comment.

Kentucky and Arkansas are among eight states that have received approval by HHS to impose requirements that people seeking coverage under Medicaid engage in work or job training.

HHS approved those projects as part of a push to put a conservative stamp on Medicaid, which expanded in 36 states following the 2010 passage of the Affordable Care Act, popularly known as Obamacare.

In Arkansas’ case, the state had already implemented its work requirements, causing about 16,000 Arkansans to lose Medicaid coverage after HHS failed to consider whether the state’s plan would help its citizens, Boasberg wrote.

His ruling in Kentucky’s case marked the second time Boasberg had vacated the approval of an HHS waiver needed by the state to move forward with its work requirements.

In his June 2018 ruling, Boasberg said HHS had failed to grapple with the fact that an estimated 100,000 people would lose Medicaid coverage.

HHS, in reapproving Kentucky’s program, sought to address that issue by arguing that figure was dwarfed by the 450,000 who would lose coverage if Kentucky moved forward with repealing its expansion of Medicaid under Obamacare.

But Boasberg said adopting that position would allow the department to justify approving any proposed plan by a state “as long as it is accompanied by a threat that the state will de-expand” Medicaid.