Iowa Gov. Kim Reynolds on Friday signed off on a law banning most abortions if a fetal heartbeat can be detected, or at about six weeks of pregnancy, The Associated Press reported.

The restriction is the strictest abortion regulation in the nation, the AP said. It also said passage and enactment of the measure has set the state up for a protracted legal fight.

The State House passed the legislation on Tuesday night with a 51-46 vote, Iowa Public Radio reported. It was debated for more than eight hours before House representatives decided on it. The bill passed the Senate early Wednesday with a 27-19 vote.

The legislation bans abortion in all cases after six weeks of pregnancy, which critics of the legislation argue is before most women are aware they are pregnant. Up until now, a woman has been able to get an abortion in Iowa up to her 20th week.

However, the measure would not ban abortion after six weeks in all cases -- some exemptions include instances of rape, incest, fetal abnormalities or to save the mother’s life.

The Associated Press contributed to this story.