Gov. Kim Reynolds of Iowa attacked former President Donald J. Trump on Tuesday for his criticism of restrictive abortion legislation, highlighting a potential weakness for Mr. Trump in her state just months before the Iowa caucuses.

During an interview broadcast on Sunday, Mr. Trump called a six-week abortion ban signed by his main rival in the polls, Gov. Ron DeSantis of Florida, a “terrible thing.” Governor Reynolds signed a similar law in Iowa this summer.

“It’s never a ‘terrible thing’ to protect innocent life,” she wrote on X, the site formerly known as Twitter, adding that she was “proud” of the state’s six-week ban, known among conservatives as a “heartbeat” bill. She did not refer to Mr. Trump — who was set to visit Iowa on Wednesday — by name, but her meaning was clear.

Later on Tuesday, one of her Republican colleagues, Gov. Brian Kemp of Georgia, similarly criticized Mr. Trump for his comment. Mr. DeSantis also went after the former president on X.

Ms. Reynolds, a Republican popular in her home state, came under attack by Mr. Trump this summer after saying she would not endorse in Iowa’s caucuses, although she has appeared at several campaign events alongside Mr. DeSantis. Criticizing her, and Iowa’s abortion ban, poses a risk for Mr. Trump, the race’s clear front-runner, as doing so could anger the evangelical Christian voters who are highly influential in the state’s Republican caucuses, set for early next year.

The conflict over abortion could also provide an opening for Mr. DeSantis ahead of the Republican debate, which Mr. Trump is skipping, next week. The Florida governor and his allies have pilloried Mr. Trump’s comments, especially his statement that he would cut a deal with Democrats on abortion, and Mr. DeSantis may continue that line of criticism at the debate, at the Ronald Reagan Presidential Library and Museum in California.

“I think all pro-lifers should know that he’s preparing to sell you out,” Mr. DeSantis said in an interview on Monday with RadioIowa. Relatively few faith leaders and elected officials have been openly critical of Mr. Trump for his comments, reflecting how unwilling many have been to challenge the man who retains the loyalty of much of the Republican base.

The nomination race has entered a new phase since Labor Day, with the Iowa caucuses just four months away. While Mr. Trump has consolidated support among Republican voters after four criminal indictments this year, his rivals are now seeking to shift the race.

While, in private, Republicans generally described Mr. Trump’s attack on Mr. DeSantis as an unforced error in Iowa, few faith leaders have openly criticized the former president. But comments from Ms. Reynolds and Mr. Kemp have reinforced his comments as an issue.

A spokesman for Ms. Reynolds declined to comment. The Trump campaign did not respond to a request for comment.

Few women know they are pregnant by six weeks. Abortion rights backers say such early bans amount to near total prohibition.

Mr. Trump has long appeared uncomfortable discussing abortion in the context of Republican politics, as a former Democrat who once favored abortion rights. Yet, he and his advisers are increasingly looking past the primary to the general election. Mr. Trump privately said in 2022 before the elections that the repeal of Roe v. Wade, made possible by the conservative majority he appointed to the Supreme Court, would hurt Republican candidates in the 2022 midterms.

This year, Mr. Trump has so far dodged questions about whether he would support a 15-week federal abortion ban, which is the baseline many anti-abortion activists have set for Republican candidates. But he still leads widely in primary polls. Many Republican voters seem willing to give Mr. Trump a pass on the issue because of his role in overturning Roe.

Although Mr. DeSantis signed a six-week abortion ban in Florida this year, he also has not endorsed a federal ban at either six or 15 weeks.

On Saturday, at a gathering of Christian conservatives in Des Moines, Mr. DeSantis was asked whether he supported a federal abortion ban. In keeping with his past statements, he did not give a direct answer.

“I think the states have done the better job thus far,” he said. “Congress has really struggled to make a meaningful impact over the years.”

He then talked about his efforts in Florida to help mothers and pregnant women.

Other candidates, such as former Vice President Mike Pence, have come out strongly in favor of at least a 15-week ban. Former Gov. Nikki Haley of South Carolina has taken a more nuanced approach, saying that Republicans will find it impossible to force such a bill through the Senate.

In Iowa, the six-week ban is not in effect, while it awaits a ruling from the State Supreme Court. Ms. Reynolds signed a similar bill in 2018, but the measure was not made law after a court challenge.

The status of abortion in Florida is also awaiting a decision from that state’s Supreme Court.