How McKinsey & Co., best known for advising Fortune 500 corporations, played by its own rules as it expanded into assignments for government clients.

Congress this week passed a bill that takes aim at the risk of improper influence when government contractors work for both federal agencies and private-sector clients. President Joe Biden is expected to sign the bill.

The bill, which the House passed on Wednesday after the Senate approved it in August, orders several changes to federal contracting rules. They include provisions requiring contractors to disclose information about potential conflicts of interest and clarifying when a contractor’s work for outside clients may create such a conflict.

In a press release announcing the results of the vote this week, the bipartisan group of senators who sponsored the bill cited ProPublica’s reporting on the consulting giant McKinsey & Company’s work for the Food and Drug Administration. McKinsey earned tens of millions of dollars providing a wide range of advice to the FDA division responsible for regulating drugs, much of it directly affecting the pharmaceutical industry. Among the subjects of McKinsey’s input: an overhaul of drug-approval processes and an assessment tool for monitoring drug safety.

At the same time, McKinsey was working for some of the country’s largest pharmaceutical companies. Its clients included Purdue Pharma and Johnson & Johnson, which were responsible for producing and distributing opioids that have gutted communities nationwide and contributed to many thousands of deaths. Yet the consultancy, which jealously guards its client roster, never disclosed those corporate projects to the FDA.

A report released in April by the House Committee on Oversight and Reform revealed just how deeply entwined the two streams of work were. Committee investigators found that at least 22 McKinsey consultants, including senior partners, worked for both the FDA and opioid makers on overlapping topics, with some advising both simultaneously. McKinsey consultants sought to leverage their FDA work to solicit pharmaceutical industry business, according to the committee’s report, and consultants with ties to Purdue influenced statements made by top public health officials about the opioid epidemic.

McKinsey has denied that its work for the FDA posed a conflict of interest and has insisted it was under no obligation to disclose its work for drug companies to its government clients. The firm has characterized its FDA work as focused on administration and operations, not decisions about when and how to regulate specific drugs. Still, McKinsey acknowledged in response to the house report that “this work, while lawful, fell short of the high standards we set for ourselves.” More broadly, the firm has sworn off any further opioid-related projects and stated that it “did not adequately acknowledge the epidemic unfolding in our communities or the terrible impact of opioid misuse and addiction on millions of families across the country.” (The firm has been a sponsor of ProPublica events.)

Existing federal rulescall for government contractors to disclose actual and potential conflicts of interest, information necessary for agencies to decide whether the situation can be mitigated or whether conflicts merit disqualifying a would-be contractor. But experts in federal contracting say that, until recently, little attention has been paid to how those rules apply to a company’s work for corporate clients — an oversight that the bill sent to the president’s desk this week seeks to remedy.

“The federal government should not have been hiring the same McKinsey employees who were simultaneously working for opioid manufacturers,” Sen. Maggie Hassan, D-N.H., one of the bill’s sponsors, said in a statement after the House voted to pass the legislation. “It is imperative that we make sure that this type of conflict of interest does not happen again.”

The bill, which is titled the Preventing Organizational Conflicts of Interest in Federal Acquisition Act, was co-sponsored by Sens. Joni Ernst, R-Iowa, Chuck Grassley, R-Iowa, and Gary Peters, D-Mich. It passed by unanimous consent in the Senate, but the House vote fell roughly along partisan lines, with three Republicans joining their Democratic colleagues in voting for passage.

The extent of McKinsey’s consulting for opioid makers began to become clear in 2019, when ProPublica first reported on it. The firm helped Purdue Pharma “turbocharge,” as its consultants put it, sales of OxyContin, the company’s highly addictive flagship painkiller. Last year, McKinsey settled legal claims brought by the governments of 47 states, the District of Columbia and five U.S. territories. Related litigation over McKinsey’s opioid work — a consolidated set of lawsuits brought by individuals, city governments, Native American tribes and school districts — remains pending before a federal judge in San Francisco.

A top FDA official told a Senate committee earlier this year that the agency would not sign new contracts with McKinsey while congressional investigations into the firm’s possible conflicts remain ongoing.