(CNN) The Trump administration is backing down from a controversial effort to lower drug prices, only days after its first major industry reform was overturned by a federal judge .

The move marks yet another stumble for President Donald Trump in his quest to fulfill his campaign promise to reduce drug costs and comes as he's facing uphill court battles on several other top priorities.

The drug price proposal would have effectively banned drug makers from providing rebates to pharmacy benefit managers and insurers -- a radical change in the way many drugs are priced and paid for in Medicare and Medicaid. Instead, drug companies would have been encouraged to pass the discounts directly to patients at the pharmacy counter.

The proposed rule was also expected to raise Medicare premiums, while only saving money for the 30% of Medicare Part D enrollees who spend a lot on medication, according to the administration's estimates. It would also have cost the federal government $177 billion over 10 years, according to the Congressional Budget Office.

"Based on careful analysis and thorough consideration, the President has decided to withdraw the rebate rule," said Judd Deere, a White House spokesman. "The Trump administration is encouraged by continuing bipartisan conversations about legislation to reduce outrageous drug costs imposed on the American people."

The potential impact on Medicare beneficiaries is why the administration withdrew the proposal, Health Secretary Alex Azar told reporters later on Thursday.

"At the end of the day, while we support getting rid of rebates, we won't put seniors at risk for premiums going up," he said.

Still, he said Congress may end up addressing rebates, which have long been a controversial part of the US drug industry and are blamed for incentivizing many players to keep list prices high. "I think you will see the days of rebates are over," Azar said.

Axios first reported on the pulling of the rule.

Here's how rebates work: Pharmacy benefit managers negotiate rebates from drug manufacturers to insurers in exchange for better coverage terms -- often in the form of lower copays for brand-name drugs. This makes it more likely that the insurers' enrollees will choose that brand-name medication over a competitor's version. The pharmacy benefit managers, however, also keep a portion of the rebate for themselves.

Insurers received $89 billion in discounts in 2016, according to estimates from Altarum, a research and consulting firm. That doesn't include the portion of the rebate that pharmacy benefit managers keep, which isn't disclosed.

Industry groups for insurers and pharmacy benefit managers, who panned the rule when it was first proposed in January, took the opportunity Thursday to lay the blame for high prices on drug makers.

Meanwhile, the Pharmaceutical Research and Manufacturers of America, who supported the proposal, called its withdrawal disappointing and a blow to seniors.

"Of all the policies proposed in Washington right now, this was the only proposal that would provide immediate savings at the pharmacy counter, instead of only saving the government or insurance companies money," said the trade association.

Trump made controlling health care costs a centerpiece of his 2016 campaign, but has yet to succeed in reshaping the American health care system, which is still dominated by the Affordable Care Act. The administration has joined a lawsuit by Republican states aimed at overturning Obamacare, after congressional Republicans stopped short of Trump's promised repeal in 2017. But the President has not yet introduced his own alternative, though he's promised to do later this summer.

Trump did, however, unveil a 44-page blueprint of its vision for lowering pharmaceutical prices in the spring of 2018, though the administration has so far only implemented one rule from it.

That measure — to require drug makers to include their list prices in television ads — was nixed by a district court judge in the District of Columbia on Monday, who said the administration had overstepped its authority.

Still in the wings is an even more controversial proposed rule that would have Medicare set the reimbursement level for certain drugs administered in doctors' offices and hospital outpatient centers based on their cost in other countries , which typically pay far less.

Last week, Trump hinted that he plans to issue an executive order along these lines.

Lawmakers on both sides of the aisle are also focused on reducing drug prices, though their efforts have mainly focused on making it easier for lower-cost generic medications to come to market.