A federal judge Thursday declared unlawful an Obama-era Labor Department rule that would have made 4.2 million more workers eligible for overtime pay by raising the salary threshold for eligibility from $23,660 to $47,476.

Provider groups had opposed the rule, which also would have adjusted the salary threshold for the affected executive, administrative and professional employees every three years. Its intended effective date of Dec. 1, 2016, had been delayed due to legal challenges from the U.S. Chamber of Commerce, several states’ attorneys general and other national and state business groups.

Thursday, Judge Amos Mazzant III of U.S. District Court for the Eastern District of Texas said the Labor Department had erred in creating a rule that based the overtime changes on a minimum salary level rather than job responsibilities.

“Congress unambiguously directed the Department to exempt from overtime pay employees who perform ‘bona fide executive, administrative, or professional capacity’ duties,” the judge wrote in his opinion. “However, the Department creates a Final Rule that makes overtime status depend predominately on a minimum salary level, thereby supplanting an analysis of an employee’s job duties.”

The Obama administration had announced the final rule in May 2016.

When it was proposed in 2015, Argentum, with the American Seniors Housing Association, asked the government to withdraw it. The American Health Care Association / National Center for Assisted Living asked that it not be applied to assisted living and long-term and post-acute care operators. LeadingAge recommended scaling back the increase in the salary test to $35,000 in 2016 dollars and that other changes be made as well.

Mazzant in September 2016 issued a preliminary injunction that put the rule on hold.

In June, the Labor Department, under Trump, said it would develop its own overtime rule. The department is accepting comments through Sept. 25.