Washington (CNN) Iowa's attorney general has recused himself from representing the state in a lawsuit challenging its new controversial abortion law because he personally disagrees with the statute.

Earlier this month, Iowa Gov. Kim Reynolds signed legislation, dubbed "the heartbeat bill," which would prohibit doctors in the state from performing an abortion if a fetal heartbeat is detected. Critics have pointed out that the legislation would effectively ban abortion at six weeks and before a woman is aware she is pregnant.

The new statute prompted Planned Parenthood and ACLU of Iowa to file a lawsuit in the state court challenging the law, according to a news release.

"This abortion ban is beyond extreme," said legal director for ACLU of Iowa Rita Bettis in the statement. "With it, Iowa politicians have tried to ban virtually all abortions for women in our state. In the 45 years since Roe, no federal or state court has upheld such a dangerous law."

In a letter, Solicitor General Jeffrey Thompson said that Iowa Attorney General Tom Miller's decision to disqualify himself "is based on the Attorney General's determination that he could not zealously assert the state's position because of his core belief that the statute, if upheld, would undermine rights and protections for women."

Read More