BISMARCK, N.D. (AP) — A federal judge has overturned a North Dakota law banning abortions as early as six weeks into pregnancy and before many women know they're pregnant.

U.S. District Judge Daniel Hovland on Wednesday ruled that the law banning abortions when a fetal heartbeat is detected is "invalid and unconstitutional." Hovland said the law "cannot withstand a constitutional challenge."

The state's only abortion clinic is in Fargo. Backed by the New York-based Center for Reproductive Rights, the clinic filed a lawsuit against the measure in July.

The measure was among four anti-abortion bills that Republican Gov. Jack Dalrymple signed into law last year with overwhelming support from the state's Republican-led Legislature.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.