“The stakes are really high right now,” said David Maris, who follows pharmaceutical stocks for Wells Fargo, given that President Trump has joined Democrats to demand action on drug costs.

Mallinckrodt acknowledges that it has increased its political spending to help its particular causes. “We actively participate in the political process on issues that matter to us and our patients,” Rhonda Sciarra, a Mallinckrodt spokeswoman, said by email. “Our PAC’s absolute spend remains small in relation to other companies in our industry.”

Congressional donations from pharmaceutical PACs rose 11 percent in this year’s first quarter, compared with the first three months of 2015 (the comparable point in the previous election cycle), according to a Kaiser Health News analysis. The increase accompanied a spike in pharma lobbying for the period.

Contributions to powerful committee members who handle health policy matters also increased in the face of public anger over the opioid crisis as well as anticipated renewal of legislation that determines the “user fees” companies pay for regulatory drug approval.

A dozen Republican committee heads and ranking Democrats on health-related panels collected $281,600 from pharma-related PACs in the first quarter, up 80 percent from what people in the same positions collected in the first quarter of 2015, the data shows. Such initial donations often set the pace for a two-year election cycle, and suggest whom corporate interests are trying to cultivate in a new Congress, with implied promises of more to come, analysts say.

For pharma companies, “now would be the time to give out the money, ahead of a piece of legislation that may come down the road,” said Kent Cooper, a former Federal Election Commission official who has tracked political money for decades.

“You want to get your name out there and make a connection with these members’ legislative assistants — so you are known to them and you can get in their door,” Mr. Cooper said.