The deal struck by the two committees — the House Energy and Commerce Committee and the Senate Committee on Health, Education, Labor and Pensions — also includes measures related to prescription drugs and five years of funding for community health centers. The legislation would also raise the minimum age for legal tobacco purchases to 21.

Up to one in five emergency room visits may result in a surprise bill, but research suggests that the problem is concentrated in a small number of hospitals that contract with physicians who don’t share their insurance arrangements. Envision and TeamHealth, the principal companies behind the advertising blitz, have employed out-of-network billing as a broad business practice, a study by Yale professors suggests. As Axios has reported, TeamHealth said in a letter to several senators that it now rarely sends surprise bills, but it did use the threat of out-of-network billing to negotiate higher prices from insurance companies.

Surprise bills can run into the thousands of dollars, representing shocks to patients who expect their care to be covered. The issue has emerged as a major consumer concern, popping up in public polling as a top health care worry and a priority for government action.

Passage of the bill is still not guaranteed, but the bipartisan agreement substantially increases the likelihood that the legislation will move this year, most likely as part of a large government funding package expected to pass before a Dec. 20 deadline. The Congressional Budget Office has said that the approach in the deal will save the government money, making it a helpful piece to help offset other priorities.

The deal struck by the two committees shares key features with a bill the Energy and Commerce Committee passed this summer. Doctors who provide care that is out-of-network for a patient’s insurance will automatically be paid the median price of in-network doctors in the area. For certain large claims, doctors will be allowed to appeal to an outside arbitrator for reconsideration.

A similar process would also apply to hospitals that treat patients in medical emergencies, and to air ambulances (the helicopters and planes that transport patients from remote areas to major hospitals). Private equity is also highly invested in the air ambulance industry.

The solution is similar to one passed in California three years ago. That law appears to have substantially reduced the number of out-of-network bills in relevant medical specialties. But doctors there have said it has lowered their pay.