A federal judge on Monday blocked a Trump administration regulation that aimed to reduce prescription drug prices.

The administration does not have the authority to require drugmakers include their prices in television ads, U.S. District Judge Amit Mehta ruled in Washington, D.C.

While President Donald Trump vowed to lower pharmaceutical prices last year amid public outcry, the judge's ruling came one day before the disclosure rule was set to go into effect. Drugmakers fought the rule with a lawsuit in June.

"No matter how vexing the problem of spiraling drug costs may be, HHS cannot do more than what Congress has authorized," Mehta wrote. "The responsibility rests with Congress to act in the first instance.”

Opinion:How the Trump prescription for drug prices transparency could make health care well again

Mehta did not share drugmakers' argument that a disclosure requirement violates companies' First Amendment rights of free speech. Instead, he noted the policy could be effective in controlling rising prescription drug costs.

The Department of Health and Human Services said it was "disappointed" in the court's decision and would work on "next steps related to the litigation," according to a statement. The administration may appeal the ruling and request Congress issue a TV ad price disclosure requirement.

“President Trump and Secretary (Alex) Azar remain focused on lowering drug prices and empowering patients through more transparency in healthcare costs," HHS spokeswoman Caitlin Oakley said in the statement. "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, and as seen from the President’s executive order, we are working on many different avenues for delivering transparency.”

Three major drug manufacturers – Merck, Eli Lilly and Amgen – brought up the lawsuit. They also argued patients with insurance would not pay the full prices listed in ads.

AARP vice president Nancy LeaMond called the ruling a disappointment.

“Today’s ruling is a step backward in the battle against skyrocketing drug prices,” she said in a statement. “Americans should be trusted to evaluate drug price information and discuss any concerns with their health care providers.”

The administration announced the disclosure rule in May, targeting medications costing more than $35 for a month's supply. HHS Secretary Alex Azar, previously an executive at Eli Lily, called the regulation a move toward transparency.

Mehta was nominated to the federal bench by former President Barack Obama.

Contributing: The Associated Press