The House passed legislation on Wednesday to limit damages from medical malpractice lawsuits as part of the GOP effort to reform the healthcare system.

Republicans passed the bill with few votes to spare in a 218-210 roll call vote. A total of 19 GOP lawmakers from both the centrist and most conservative wings of the party voted against the bill, as did all House Democrats.

The bill would cap noneconomic damages, such as emotional suffering, to $250,000. The bill would also establish a three-year statute of limitations after an injury, or one year after the discovery of an injury.

The provisions would apply to healthcare lawsuits where coverage was provided or subsidized by the federal government. The bill would preempt state laws, unless they already specify a shorter time period for the statute of limitations or a particular amount of damages that can be awarded in a lawsuit.

Economic losses, like medical costs and lost wages, would be fully compensated.

Proponents of the measure said it would help bring down costs of healthcare and increase availability of doctors. They pointed to litigation reforms in California to lower medical malpractice liability insurance premiums for healthcare providers as the basis for the legislation considered on the House floor on Wednesday.

"Healthcare costs are out of control due in large part to unlimited lawsuits and other problems ObamaCare failed to solve or ObamaCare made worse," said Rep. Steve King (R-Iowa), the author of the bill.

The Congressional Budget Office estimated that the legislation would reduce the deficit by about $50 billion over 10 years. The nonpartisan budget scorekeeper calculated the deficit reduction based on the expectation in part that the bill would lower premiums for medical liability insurance.

Members of the libertarian-leaning Liberty Caucus oppose the bill because of concerns that it unconstitutionally preempts state laws.

"To support H.R. 1215 while elsewhere decrying the growth of the federal government would be to turn federalism into a mere rhetorical tool to be trotted out when it happens to further an agenda," Matt Weibel, the executive director of the Liberty Caucus, wrote.

In floor debate, Democrats warned that the bill would deny full compensation to victims of medical malpractice.

Rep. John Conyers Jr. (Mich.), the top Democrat on the House Judiciary Committee, noted that children, women and low-income people have been more likely to receive noneconomic damages because they're often not able to establish economic losses like lost wages in malpractice lawsuits.

"Imposing a severe limit on noneconomic damages, therefore, hurts them disproportionately," Conyers said. "This bill would cause real harm by severely limiting the ability of victims to be made whole."