A federal judge ruled against the Trump administration's highly touted small-business health insurance plan, calling it an "end run" around consumer protections provided by the Affordable Care Act.

The ruling Thursday by U.S. District Judge John Bates in Washington, D.C., is the second setback in a week for the administration's health care initiatives. On Wednesday another federal judge blocked Medicaid work requirements for low-income people.

At issue in the latest ruling are so-called "association health plans," in which businesses and sole proprietors can band together to offer lower-cost coverage that doesn't provide all the benefits required under the Affordable Care Act. Bates took issue with how the Trump administration interpreted the Employee Retirement Income Security Act, which regulates how health care plans are provided to employees.

Get Breaking News Delivered to Your Inbox

For instance, Bates noted the Trump administration's small-business health insurance plan would allow two self-employed individuals to consider themselves both employees and employers, which would allow these insurance plans to be offered under ERISA. He called the argument "pure legerdemain" in his 42-page ruling.

The Trump administration's plan "unreasonably expands the definition of 'employers' to include groups without any real commonality of interest and to bring working owners without employees within ERISA's scope despite Congress's clear intent that ERISA cover benefits arising out of employment relationships," Bates wrote.

President Donald Trump has hailed the small-business plans as a big success, but their impact is difficult to measure.

Unable to repeal the Obama health law in Congress, the Trump administration has tried to use its rule-making powers to create room for alternatives.

Mr. Trump praised the plan last year, saying it would allow business owners to avoid paying too much. "For the first time ever, sole proprietors will be able to buy lower-cost group insurance instead of getting ripped off by this disaster we all know as Obamacare," he said.