Ohio Governor Mike DeWine on Thursday signed a law banning abortion if a fetal heartbeat can be detected. Former Governor John Kasich had twice vetoed similar legislation.

"Government's role should be to protect life from the beginning to the end," DeWine said before signing the law, which is set to go into effect in July, according to Cleveland.com.

The Ohio House had voted 56-40 and the Senate 18-13 on Wednesday to send Senate Bill 23 to Gov. DeWine's desk. State Senator Kristina Roegner was the bill's primary sponsor.

The new law makes it a fifth-degree felony offense in Ohio to induce or perform an abortion after the detection of a fetal heartbeat, except in a case of medical emergency. In addition, a doctor who performs an abortion could face sanctions and fines by the State Medical Board of Ohio, including the suspension of their medical license.

Women can also sue abortion providers for wrongful death under the new law, and a doctor cannot use unconstitutionality of the law as a defense unless a court rules the law unconstitutional.

"The legislature and Governor DeWine have declared that no longer should the beating hearts of humans too young to be born be violently torn apart by abortion," said Mark Harrington, president of the national anti-abortion group Created Equal.

"If pro-abortion lobbies present a legal challenge to this Act, we will defend these babies all the way up to the Supreme Court."

Five other states have now passed similar "heartbeat bills," with two so far being blocked by the courts, the Associated Press reports. Georgia's legislature has passed a heartbeat bill but Governor Brian Kemp has not yet signed it.

Pro-abortion groups such as the American Civil Liberties Union of Ohio have vowed to challenge Ohio's new law in court.

Former Ohio Gov. John Kasich vetoed a similar bill late last year, and the Republican-led Ohio House of Representatives voted 60-28 to override the governor's veto. The Ohio Senate subsequently failed to override the governor's veto, and the bill did not pass.

Democrats in the House reportedly argued that the bill was unconstitutional, an assertion with which Kasich ultimately agreed.

Kasich, who had supported other pro-life legislation as governor, reasoned at the time that passage of the bill would result in a costly legal fight for the state of Ohio, which would result in the state losing and being forced to pay "hundreds of thousands of dollars to cover the legal fees for the pro-choice activists' lawyers."