Kentucky lawmakers wrapped up work Friday on revising the medical malpractice system by creating panels of medical providers to review claims of error or neglect before cases go to court.

The legislation, long a priority of many Republicans, won final passage on a 25-11 vote in the Senate, two days after the proposal narrowly passed the GOP-led House. The bill, which has been sought by many in the health care sector, now goes to Republican Gov. Matt Bevin.

Under the bill, medical review panels would scrutinize the merits of malpractice lawsuits against health care providers or institutions before the cases proceed to court.

Supporters say the three-member panels would help ferret out meritless malpractice lawsuits that drive up the cost of malpractice insurance rates for the state’s health care industry. Those high insurance premiums are a disincentive for people to practice medicine in Kentucky, they say.

“This is going to get rid of frivolous lawsuits,” said Republican Sen. Ralph Alvarado of Winchester, a doctor and the bill’s lead sponsor. “And I think the people that have legitimate cases are going to be able to get an award much more quickly.”

Opponents say the panels would create barriers that delay plaintiffs’ access to courts. They predict the measure, if it becomes law, will likely provoke legal action.

“We’re getting ready to pass something that’s unconstitutional,” Rep. Chad McCoy, a Bardstown Republican, said during the House debate this week.

The bill’s supporters said the House changes helped shore up the measure’s constitutionality.

Those changes include requiring review panels to issue opinions in nine months or lawsuits could proceed in court. The original bill allowed the panel’s opinions to automatically be admitted into court as evidence. Under the final version headed to the governor, trial judges would be asked to decide on the admissibility.

Each side in a dispute would select one panel member, and those two would choose the third member. Cases could bypass panel review and go directly to court if both sides agreed.

Similar measures were introduced for years but died when Kentucky’s legislature was politically divided. The push to create review panels gained strength when Republicans took control of the House after last year’s election.

The Senate is solidly controlled by the GOP.