WASHINGTON — Tucked in the massive congressional budget bill is a provision that props up the price Medicare pays for a handful of medications, costing taxpayers millions at a time when the Trump administration is vowing to reduce the cost of prescription drugs.

Lawmakers acted after a lobbying campaign by a small Washington state pharmaceutical company called Omeros. Its main product is a drug called Omidria, used by hospitals in cataract surgery, which had recently lost a coveted Medicare reimbursement status. Individuals associated with the company also stepped up their political contributions.

Rep. Cathy McMorris Rodgers of Washington, the fourth-ranking House Republican, took the issue to Speaker Paul Ryan, R-Wis., securing a place for the drug provision in the 2,232-page spending bill signed Friday by President Trump, aides said. The provision restores the drug’s expired reimbursement status for two years, making it more lucrative for hospitals to continue using it.

The targeted provision succeeded even as broader health care measures failed to make the cut in the budget bill, from legislation to stabilize insurance premiums under the Affordable Care Act for millions of consumers, to a drug-industry backed effort to roll back recent changes that shift some Medicare costs to pharmaceutical companies.

The nonpartisan Congressional Budget Office estimates the pricing break for the Omeros drug and three products from other companies will cost taxpayers $26 million over 10 years, taking into account long-range effects.

Speaker Ryan and Rep. McMorris Rodgers said they acted to preserve patients’ access to an innovative drug.

Getting the change was a major priority for Omeros and its CEO, Gregory Demopulos.

“Our frustration, shared by physicians nationwide, remains patients’ restricted access to Omidria following its pass-through expiration on Jan. 1,” Demopulos said in a recent news release.