A federal judge on Monday sided with a coalition of drug companies and blocked the Trump administration from implementing a policy that would require prescription drug manufacturers to disclose list prices in TV ads.

The pharmaceutical companies — Amgen, Merck, and Eli Lilly — were joined in the lawsuit by the Association of National Advertisers. The rule was scheduled to take effect Tuesday.

U.S. District Court Judge Amit P. Mehta in Washington, D.C., agreed with the drug companies that the Department of Health and Human Services (HHS) does not have the authority to compel drug companies to disclose prices.

“To be clear, the court does not question HHS’s motives in adopting the [rule],” Mehta wrote. “Nor does it take any view on the wisdom of requiring drug companies to disclose prices. That policy very well could be an effective tool in halting the rising cost of prescription drugs. But no matter how vexing the problem of spiraling drug costs may be, HHS cannot do more than what Congress has authorized. The responsibility rests with Congress to act in the first instance.”

Under the rule, which was announced by HHS Secretary Alex Azar in May, drug manufacturers would have to state the list price of a 30-day supply of any drug that is covered through Medicare and Medicaid and costs at least $35 a month.

Azar argued that forcing drugmakers to disclose their prices in direct-to-consumer TV advertising could shame companies into lowering their prices. In announcing the rule, Azar said there’s no reason patients should be kept in the dark about the full prices of the products they’re being sold.

“Patients have a right to know, and if you’re ashamed of your drug prices, change your drug prices. It’s that simple,” Azar said in May when the administration announced the final rule.

Drug companies fought the rule from the start, arguing it would confuse consumers because a drug’s list price — which doesn't reflect the discounts negotiated with insurers or through patient assistance programs — is often higher than what the patient actually pays.

PhRMA, the nation’s top drug lobby, wants its members to disclose pricing on separate websites.

The companies also argued that the rule violates their First Amendment rights. However, Mehta's ruling noted that because the agency did not have the authority to issue the rule in the first place, the First Amendment claim was not valid.

In a statement, HHS spokeswoman Caitlin Oakley said the administration was "disappointed" in the ruling.

“We are disappointed in the court’s decision and will be working with the Department of Justice on next steps related to the litigation," Oakley said. "Although we are not surprised by the objections to transparency from certain special interests, putting drug prices in ads is a useful way to put patients in control and lower costs."