Thousands of people rally on the National Mall before the start of the 44th annual March for Life January 27, 2017 in Washington, DC. The march is a gathering and protest against the United States Supreme Court's 1973 Roe v. Wade decision legalizing abortion.  (Photo by Chip Somodevilla/Getty Images)
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.”

In an email, Brenna Smith, the press secretary for the Iowa governor’s office, said they will instead be represented by the conservative, anti-abortion law firm Thomas More Society “at no cost to taxpayers.”

“We knew there would be a legal fight, but it’s a fight worth having to protect innocent life,” Smith said.

Dawn Laguens, Planned Parenthood’s executive vice president, applauded Miller’s move to step aside in the case.

“We commend Attorney General Tom Miller for standing up for a woman’s right to control her own body, and decide for herself whether and when to become a parent,” Laguens said in a statement. “Not only is this ban blatantly unconstitutional, it’s also extremely harmful to women.”

CNN’s Clare Foran contributed to this report.