PIERRE, S.D. (AP) — South Dakota Gov. Dennis Daugaard on Thursday signed a law prohibiting most abortions beyond 19 weeks of pregnancy, the latest state to enact such a ban.

The Republican governor “is sure that” the state’s attorney general “will be prepared to defend the constitutionality of the bill,” Daugaard spokeswoman Kelsey Pritchard said in an email. The measure offers some exemptions for women in medical emergencies, but not in cases of rape or incest. It is set to go into effect July 1.

READ MORE: Lynx All-Star Napheesa Collier And Partner Welcome Baby Girl, Mila

The ban is based on the disputed premise that a fetus can feel pain at that stage, and Republican Rep. Isaac Latterell, the measure’s main House sponsor, said it recognizes “the humanity of these children.”

“I think it’ll save lives because it lets women know that their children really are humans just like us,” Latterell said. “I think it’s a great step forward for our state, and I would like to see us do more to protect the innocent.”

The American Congress of Obstetricians and Gynecologists has gathered evidence that fetal pain is unlikely until weeks later.

Timothy Stanley of Planned Parenthood Minnesota, North Dakota, South Dakota said the state is continuing to intrude on women’s health care decisions.

“This is just another bill that puts politicians in the way of women’s personal medical decisions,” Stanley said. “I think this bill could do tremendous harm to the women who are the most vulnerable in the state of South Dakota.”

READ MORE: Man Sustains Life-Threatening Wounds In Northeast Minneapolis Stabbing

The measure allows abortions later than 19 weeks if there is a medical emergency, but a claim or diagnosis that a woman intends to kill or harm herself aren’t part of the exemption. The law says that when such an abortion is necessary because of an emergency, the doctor must “deliver the child in the manner which … provides the best opportunity for the unborn child to survive,” but only if that is consistent with preserving the woman’s life and preventing an “irreversible” impairment of a major bodily function.

According to the American College of Obstetricians and Gynecologists, there’s no record of a successful birth before 23 weeks. That would be roughly 21 weeks under the South Dakota measure, which relies on the “probable post-fertilization age.” Doctors say the date of fertilization can’t be scientifically pinpointed and estimate gestational age based on a woman’s last menstrual period.

Performing an abortion that violates the new threshold is a Class 1 misdemeanor, which carries a penalty of up to a year in jail and a $2,000 fine. A woman who gets such an abortion would not be subject to that consequence.

The state’s only abortion clinic, in Sioux Falls, doesn’t perform abortions after a pregnancy reaches 14 weeks, according to Planned Parenthood Minnesota, North Dakota, South Dakota. Three major South Dakota health systems have said they terminate pregnancies only in life-threatening or terminal circumstances.

Similar laws are in effect in 12 other states. Courts have blocked laws in Arizona, Idaho and Georgia.

MORE NEWS: Man Stabbed In Rochester, Taken To Hospital

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)