Abortion opponents were pressing conservative lawmakers to leave the bill as it was written. The bill contained narrow exceptions for women who were raped and minors who were incest victims — but only if they reported their assault to the authorities. Ms. Walorski and other Republican women in the House objected, saying they did not believe the exceptions were fair to the large numbers of women who never report their assaults.

The upheaval was a sign of the shifting politics around women’s health and abortion inside the Republican Party. The House passed an identical 20-week ban in 2013 and many of the women who broke with their party on Thursday voted for it. And while Majority Leader Mitch McConnell has vowed that the Republican-led Senate would hold a vote on the ban this year, the rape and incest provision would have complicated efforts to win votes from more moderate Republicans. (It is all but certain the bill would fail in a filibuster by Democrats.)

Supporters of the 20-week ban were deeply disappointed that they could not deliver on their pledge to abortion opponents.

“We made the most desperate attempt to avoid these kinds of surprises by making sure that the bill that we introduced was exactly — word for word, letter for letter — the same as we passed,” said Representative Trent Franks, the Arizona Republican who sponsored the bill. “We couldn’t find a consensus alternative between the groups and the interested parties. And I think that time will help us accomplish that.”

And some of the groups that lobbied to pass the bill as it was seemed unforgiving as they marched from the mall to the steps of the Supreme Court.

“Certain lawmakers who voted for the same language in 2013, and who had promised their pro-life constituents that they would do so again, instead worked to weaken the bill or to prevent it from coming to the floor,” said Carol Tobias, president of the National Right to Life Committee. “Pro-life citizens across the nation are sharply disappointed with those lawmakers who violated commitments to constituents and derailed a bill to protect babies.”

Democrats were nearly unanimous in their opposition. Just three voted for the taxpayer funding ban, while 178 voted no.