Inside the Family Leader’s office near Des Moines, Iowa, photographs of Republican presidential contenders past grace the walls. Housing secretary Ben Carson, former Pennsylvania senator Rick Santorum, Texas senator Ted Cruz all stand frozen onstage, informing visitors of the Family Leader’s influence.

Alongside them is the group’s president, Bob Vander Plaats, a member of a coalition of abortion foes who worked in Iowa to pass one of the industrialized world’s most restrictive bans on abortion. In one portrait, Donald Trump’s face looms over Vander Plaats speaking to a congregation, heads bowed.

A portrait of Donald Trump looming over Bob Vander Plaats hangs at the Family Leader’s office near Des Moines, Iowa. Photograph: Scott Morgan/The Guardian

Vander Plaats is triumphant. He and a network of other activists helped Iowa legislators pass a law that bans abortion after a fetal heartbeat is detected. That is usually at about six weeks, before most women know they are pregnant. Supporters hope the new law will challenge Roe v Wade, the landmark 1973 US supreme court decision which legalized abortion.

Their campaign in Iowa combined local activists with outside pressure groups and the support of the White House, and was even conducted against the wishes of one major anti-abortion group. It ended in a remarkable victory for what campaigners hope will be the ultimate defeat of abortion rights in America.

“We would want no women to ever have to go through [abortion],” said Vander Plaats, who described the Iowa law as “pro-woman”.

Buoyed by the Trump administration’s support of anti-abortion policies and leaders, Iowa’s law represents an abrupt right turn for the anti-abortion movement.

The thinking is simple: courts are risky. Yes, courts could rule against abortion providers, but they could also rule in favor of a woman’s right to choose. That would create even more obstacles to overturn Roe v Wade. (Iowa’s new law is being challenged by Planned Parenthood of the Heartland.)

With this strategy in mind, the nation’s oldest anti-abortion group, National Right to Life, refused to endorse this bill. But others, emboldened by the Trump administration, flung themselves at it, believing Iowa could provide the case that finally overturns Roe v Wade.

“The courts are changing a ton,” said Vander Plaats. “The courts are changing at the supreme court and all the way through, because of a Trump presidency.”

Pre-Trump, Iowa was a purple state, known for polite disagreement (“Iowa nice”), evenly split congressional delegations and being the third state in the nation to legalize gay marriage.

If Vander Plaats and others had got their way, Iowa’s law would ban abortion in all circumstances – including rape, incest and fetal abnormalities.

“We’re not in favor of exemptions,” said Vander Plaats. “Whether it’s rape, or incest, or a fetal abnormality, they all have one thing in common – it’s a heartbeat – and I didn’t want the law to contradict itself.”

It’s not that Iowa passed the first “heartbeat bill”. Ohio passed one in 2011, which Governor John Kasich vetoed. North Dakota and Arkansas enacted heartbeat laws in 2013, but both were overturned.

It’s the timing that is significant. Like-minded conservatives are betting the US supreme court will swing right in the not too distant future. There are rumors Justice Anthony Kennedy, a swing vote, could retire this year. One Iowa state senator who supported the six-week ban wagered liberal justice Ruth Bader Ginsburg “could be, at 85, here today and gone tomorrow”.

“I’m not naive, this bill will never see the light of day in Iowa,” said Iowa state senator Rick Bertrand, who supported the bill. Bertrand is a builder from rural Sioux City in Iowa’s north-west corner. “This bill was about taking another shot at Roe v Wade.” Trump, he said, was the “game changer”.

In Iowa, tides changed in 2016. Two hundred and six counties in America voted twice for Obama, then flipped for Trump. Thirty-one are in Iowa, the most of any state. Republicans suddenly controlled both state the legislature and the governorship.

By early 2017, national and local anti-abortion groups in Iowa formed a coalition and found legislation to support – a 20-week ban on abortion and 72-hour waiting period to terminate a pregnancy. The law passed. The restriction did not generate national headlines, as the heartbeat bill did, but proved groups could work in lock-step.

Iowa Right to Life’s COO, Scott Valencia, and Iowans for Life’s executive director. Maggie DeWitte. Photograph: Scott Morgan/The Guardian

Groups also received personal attention from Trump and Pence last fall in trying to pass a similar law in Congress.

One group, Faith2Action, sent an email to supporters in September 2017, bragging that Pence “loves” the heartbeat bill, with a snapshot of the group’s leader and the vice-president looking over a document.

“He promised to put the letter calling for its passage directly on President Trump’s desk,” the group wrote. The same day that Faith2Action met with Pence, a “grassroots” group of anti-abortion activists had a sit-down meeting with Trump.

Faith2Action went on to work with the Iowa congressman Steve King, who introduced a heartbeat bill to Congress in the winter. That group’s founder, Janet Porter, describes herself as one of the authors of Ohio’s first heartbeat bill. King relied on the same tactics as used in Ohio, including allowing an 18-week-old fetus to “testify” before a congressional subcommittee.

Porter and King also worked with Tom DeLay, the disgraced former House speaker. In Iowa, DeLay testified that “leaving Congress” – he resigned amid a money laundering scandal – “without ending abortion is my biggest regret”.

Without the endorsement of National Right to Life, King claimed, the bill failed to reach the floor. Abortion opponents accused National Right to Life of a “Judas”-like betrayal. But they moved forward in Iowa.

An arm of another group present at Trump’s fall meeting, the Charlotte Lozier Institute, was represented by “former abortionist” Kathi Aultman at the Iowa public hearing. She regularly testifies to being a “mass murderer”. The Charlotte Lozier Institute is an arm of the Susan B Anthony List, one of the largest anti-abortion groups in the nation.

Local groups also pitched in, such as the Family Leader, Iowans for Life and Iowa Right to Life, which broke from its affiliation with the national group of the same name. “We had national organizations reaching out to us and saying: ‘How can we help?’” said Vander Plaats.

Under the slogan “She is a baby”, the Family Leader rustled up 67,000 emails to lawmakers. DeLay scored local press coverage. Senators riled the base, and five House members flipped their support.

Then, national groups such as the pro-life Thomas More Society and Liberty Counsel stood in the wings, ready to defend the law when a court challenge was inevitably filed. National groups also helped craft the bill they would defend, Iowa anti-abortion advocates said, studying and learning from their predecessors’ mistakes.

“We went out of our way to approach these national organizations, and say: ‘Do you see any glaring problems with this bill,” said Scott Valencia, the leader of Iowa Right to Life. “We were looking for sustainability.”

There was, however, a compromise to make. The law includes exemptions to the six-week abortion ban if a woman is raped and reports it within 45 days, a victim of incest (if reported within 140 days), or if the fetus has an abnormality.

“Certainly we are not done by any measure,” said Maggie DeWitte, executive director of Iowans for Life, who said she was disappointed by the exemptions. “Our gold standard is life at fertilization, and we will continue to push for that.”

Part of the reason the strategy in Iowa worked, said Bertrand, is because senators stuffed the six-week ban into a must-pass budget bill.

Iowa’s strategy is already being replicated in more conservative states. Mississippi passed a 15-week ban soon after. If that survives a court challenge, a similar ban may be enacted in Louisiana.

Bertrand helped partially defund Planned Parenthood in 2017, which led to the closures of four of the agencies clinics, including one in Sioux City. There are now 12 in Iowa. Abortions are offered in only five locations in the state.

Bertrand was one of the strongest supporters of the heartbeat bill. In the wee morning hours in the final days of the 2018 legislative session, it was Bertrand who rose, unshaven and rumpled, to rally Republicans for the final vote. The closely divided House approved the measure earlier that evening.

Cindy Axne, a Democratic challenger to Republican Iowa congressman David Young, talks to primary voters on 16 May 2018 in Atlantic, Iowa. Photograph: Scott Morgan/The Guardian

“My friends today, we will make history,” Bertrand said, in a victory lap around 2am on 2 May. “This chamber is amazing, we’re warriors,” Bertrand said. He thanked the former senate majority leader Bill Dix, who brought the bill to the floor. He ended: “Let’s light this candle.”

The Democratic senator Janet Peterson rose to recite facts. Iowa’s maternal death rate tripled in 10 years. Four family planning clinics closed last year alone. If this passes, she said, livestock will have better reproductive care than Iowan women and girls.

But the battle was already won. At 2.20am, senators passed the law, and adjourned two minutes later. The next morning, left-leaning Iowans woke up to a jolt.

Cindy Axne, a Democratic challenger to the Republican Iowa congressman David Young, said supporters of abortion rights were “in complete shock”.

“It’s just a slap in the face to women,” she said. “It’s not the Iowa most of us are used to.”