Doctors who worry about medical malpractice lawsuits would get major relief under legislation that was approved by a House committee Tuesday and that would make it harder for patients to come after their money.

The legislation, approved by the House Judiciary Committee in an 18-17 vote, would cap damages that can be paid by doctors, hospitals, and nursing homes. (Many states already limit awards paid by individual providers.) It would cover individuals who are insured under Medicare, Medicaid, veterans or military health plans, and the Affordable Care Act, and could also impact people covered under COBRA or health savings plans.

In introducing the measure, Iowa Republican Representative Steve King referred to airlines, which, he said, “throw blame out the window” after an accident, and instead focus on how to prevent it from happening again.

His comment enraged several Democrats, who accused King of favoring the economic interests of health care providers over malpractice victims — and of showing a lack of basic knowledge about law.

“We cast blame,” said Florida Democratic Representative Ted Deutch. “That’s how the justice system works.”

Lobbyists for medical professionals were delighted with the legislation.

“Instead of being able to focus on their patients, more and more doctors today are forced to defend their reputations and professional decisions in the courtroom against claims that turn out, in most cases, to be without merit,” said the Health Coalition on Liability and Access, an advocacy group made up of professional medical societies, hospital associations, and insurers.

Tuesday’s session surprised Democrats and their allies, who believed they were weeks away from having to fend off what they view as encroachments on consumer protections.

“We expected something in the context of the Affordable Care Act replacement,” said Joanne Doroshow, executive director of the Center for Justice and Democracy. “But not a standalone medical malpractice-nursing home-drug industry bill. We were fairly shocked.”

At the hearing, Michigan Representative John Conyers Jr., the ranking Democrat on the Judiciary Committee, and several of his colleagues criticized the GOP’s rapid movement on the bill.

“This measure has repeatedly failed because of its many problems, including its trampling of states’ rights,” Conyers said. “The majority is now rushing it to markup as part of their chaotic attempt to repeal the Affordable Care Act even though it will directly impede Americans’ access to safe quality medical care.”

Conyers also said he believed that the legislation would indirectly shield pharmaceutical companies and medical device makers who sell dangerous products.

The issue of medical malpractice has long sharply divided Republicans from Democrats, but even within the Democratic Party, doctors and hospitals have always found some allies.

In addition to capping non-economic damages, the new legislation would give immunity to drug companies in cases in which patients were harmed by FDA-approved prescriptions.

Although the bill would not not limit recovery of economic damages — such as lost wages, past and future medical expenses, and other out-of-pocket costs for victims of medical negligence — it would cap payments for a victim’s pain and suffering at $250,000. This would most affect people not in the workforce, such as the elderly, or children.

In an unusual turn, most of the lawmakers arguing that the measure would usurp states’ rights were Democrats. Not only would it set a bad precedent, several Democratic lawmakers said, but it would specifically preempt state malpractice laws that are plaintiff-friendly.

Democratic Representative Pramila Jayapal of Washington was particularly concerned, noting a rash of problems at the neuroscience department in Swedish Hospitals in the Seattle area.

“In Washington, our Supreme Court struck down caps as unconstitutional,” Jayapal said. “We should be protecting patients.”

Under the King proposal, she said, health providers “can act irresponsibly perhaps to make more money and get away with it.”

Several Democrats introduced amendments that would water down the legislation, to preserve legal protections for nursing home residents and those who suffer from mistakes such as doctors leaving spare tools inside their bodies during surgery. The proposed amendments were all rejected.

In the battle over malpractice suites, plaintiff’s lawyers and the medical industry have long accused one another of being more powerful, but in pure lobbying expenditures, the health care industry wins out. Last year, health care companies and related interests spent $563 million on lobbying, while the trial lawyers spent $6 million.