(CNN) An Iowa state judge on Tuesday struck down the state's so-called "fetal heartbeat" law, declaring one of the nation's most restrictive abortion bans unconstitutional.

The law, signed in May, would ban doctors from performing most abortions once a fetal heartbeat is detected. That can happen as early as six weeks into a pregnancy, before many women even know they are pregnant.

Polk County District Judge Michael Huppert wrote in his decision striking down the law that its defenders didn't identify a compelling state interest in barring most abortions after a fetus' heartbeat can be found, The Des Moines Register reported.

The bill, signed by Republican Gov. Kim Reynolds , was challenged by Planned Parenthood of the Heartland and the Emma Goldman Clinic, a move that halted it from taking effect last summer.

Some legislators who support the law said in May they hoped it would lead to a legal battle that reaches the Supreme Court. Emboldened by the court's new conservative majority , they said they think it will help overturn Roe v. Wade , the 1973 Supreme Court ruling that affirmed the right to an abortion in all 50 states.

Read More