Ohio Gov. Mike DeWine, a Republican, signed a bill Thursday to ban abortions once a heartbeat is detected, about five to six weeks into pregnancy, making it one of the most restrictive abortion laws in the country.

The state legislature passed the measures on to the governor Wednesday as anti-abortion and pro-abortion groups clashed outside the state House chamber, chanting opposing slogans so loudly they could be heard across the statehouse.

The Ohio legislature has been drafting the measure for years. Former Republican Gov. John Kasich vetoed similar bills twice in the past on the grounds that he didn't want to spend taxpayer dollars on exorbitant legal fees to prove the law constitutional.

Just hours before DeWine signed the bill, the ACLU pledged to fight it in court, arguing that the bill is direct violation of the 1973 Roe v. Wade Supreme Court decision, which legalized abortion nationwide.

“This legislation is blatantly unconstitutional and we will fight to the bitter end to ensure that this bill is permanently blocked,” said Freda Levenson, Legal Director at the ACLU Of Ohio. “SB 23 is one of the most aggressive, oppressive, and radical attacks against women ever seen in this state and this country.”

Throughout his campaign for governor, DeWine pledged he would sign the bill once it passed through the general assembly.

“Pro-life Ohio thanks Governor DeWine for taking a courageous stand on behalf of unborn children with beating hearts,” said Mike Gonidakis, president of Ohio Right to Life.

Similar “heartbeat bills” have already been struck down in Iowa, Kentucky, Arkansas, and North Dakota. This makes Ohio’s bill the most restrictive in the country, as it makes no exceptions for cases of rape or incest.