Early this summer, Congress appeared on its way to eradicating the large medical bills that have shocked many patients after emergency care. The legislation to end out-of-network charges was popular and had support from both sides of the aisle. President Trump promised his support.

Then, in late July, a mysterious group called Doctor Patient Unity showed up. It poured vast sums of money — now more than $28 million — into ads opposing the legislation, without disclosing its staff or its funders.

Trying to guess who was behind the ads became something of a parlor game in some Beltway circles.

Now, the mystery is solved. The two largest financial backers of Doctor Patient Unity are TeamHealth and Envision Healthcare, private-equity-backed companies that own physician practices and staff emergency rooms around the country, according to Greg Blair, a spokesman for the group.

“Doctor Patient Unity represents tens of thousands of doctors across the country who understand the importance of preserving access to lifesaving medical care and support a solution to surprise medical billing that protects patients,” said Mr. Blair, who issued the statement weeks after the group was first contacted about the campaign. “We oppose insurance-industry-backed proposals for government rate setting that will lead to doctor shortages, hospital closures and loss of access to medical care, particularly in rural and underserved communities.”