BISMARCK, N.D. — A federal judge Wednesday overturned a North Dakota law banning abortions when a fetal heartbeat can be detected, as early as six weeks into pregnancy and before many women know they're pregnant.

U.S. District Judge Daniel Hovland, who is based in Bismarck, said the law is "invalid and unconstitutional" and that it "cannot withstand a constitutional challenge." The state attorney general said he was looking at whether to appeal the decision.

North Dakota is among several conservative states that have passed new abortion restrictions in recent years, but abortion rights advocates called North Dakota's fetal heartbeat law the most restrictive in the country.