Washington (CNN) The GOP-controlled House of Representatives passed legislation on Thursday banning all taxpayer money for abortions. But that bill was a backup, after another proposal to ban so-called "late -term" abortions was suddenly yanked the late Wednesday night because of blow back from moderate Republicans who argued it was too extreme.

The bill barring federal taxpayer funds was approved in the last Congress. On Thursday it passed 242-179, with three Democrats joining virtually all House Republicans to support the bill. GOP Rep. Richard Hanna of New York was the one Republican who voted against it.

Earlier on Thursday, the White House promised to veto the legislation if it ended up on the President's desk.

The vote came as tens of thousands of anti-abortion rights activists descended on the National Mall for the annual "March for Life." Thursday's event coincides with the 42nd anniversary the of the Supreme Court's Roe v. Wade decision which upheld a woman's access to abortion based on privacy rights in the Constitution.

Republican leaders initially planned to pass the "Pain Capable Unborn Child Protection Act," a bill banning abortion procedures for women who are beyond 20 weeks into their pregnancy. A similar version of that bill was approved by the House in 2013.

But a bloc of female GOP members - led by North Carolina Rep Renee Ellmers - opposed a provision in the bill that provided an exception for women who are raped, but required that that they show evidence they filed a police report in order to have access to an abortion. These members argued the vast majority of rapes go unreported, and some are the result of incest. Some male members agreed that provision shouldn't be included, and urged leaders to strip it out.

"I'm pro-life," Florida GOP Congressman Carlos Curbelo told reporters on Thursday. But he added, "I'm certainly not going to ever put myself in the position where I'm telling any woman that their account of a rape is valid or not."

House Democratic leader Nancy Pelosi needled the GOP about the internal spat, saying, "They didn't even have their act together."

And she criticized the GOP for spending time on the abortion debate instead of debating measures focused on job creation.

"They're putting a bill on the floor that undermines the health of America's women. The bill is worse than the bill they pulled from the floor yesterday," Pelosi said in a news conference. "That affected thousands of women, maybe, this affects millions of women. It not only affects their health, it affects the personal decisions of how they spend their own money for health insurance."

Religious activists pushing for more abortion restrictions were unhappy with the Republican leadership's decision to cancel the vote on that measure.

"I have nothing but respect for the speaker but this was not the best moment for the House Republicans by far -- and happening on the day on the March for life," Dr. Russell Moore, president of the Southern Baptist Convention's Ethics and Religious Liberty Commission, told CNN.

The late-night decision to pull the bill was a unusual win for more centrist members, who argued that the bill sent the wrong message - especially to women and young people - at a time that the party was working to expand its support ahead of the 2016 national election.

"This appeared to be messaging bill, and the message that was being sent was not a very good one," Republican Rep Charlie Dent of Pennsylvania said, noting that the bill was not going anywhere in the Senate.

"I would prefer that our party spent less time focusing on these very contentious social issues, because that distracts us from broader economic messages where I think we have much greater appeal to the larger public," he said.

Since Republicans took control of the House in 2011, House Speaker John Boehner has tangled with conservatives on a range of bills, and in some cases their opposition has thwarted Boehner's legislative agenda. After the 2014 midterm election, the GOP conference now has 246 members, including 22 female members. The willingness of many of these members, and those who represent competitive districts, to challenge their leaders may complicate future legislation.

"There is a growing sentiment in the conference that we want to move legislation that can make a difference for the American people and not take an infinite number of symbolic votes that might be good for a campaign ad or get people riled up," Curbelo told CNN.

North Carolina Republican Rep. Richard Hudson, who said he wasn't involved in the discussions about the bill, said, "None of us saw it coming."

JUST WATCHED Court strikes down abortion buffer zones Replay More Videos ... MUST WATCH Court strikes down abortion buffer zones 01:11

He pointed out that members voted on the same bill last year, and said, "Now there is a concern, then there wasn't."

Much of the criticism from anti-abortion rights groups centered on Ellmers. Moore said activists at the Match for Life took notice of the North Carolina Republican's role.

"I've heard the name Renee Ellmers once every 20 seconds this morning on the mall," he said.

She issued a statement after Thursday's vote saying she still was still discussing bringing the 20-week abortion bill ban bill back to the floor.

"Our goal is to find a way to get this legislation in its best possible form," she said.

Rep. Trent Franks of Arizona, the author of the bill that didn't get a vote, told reporters he was "disappointed" and said he was confident the measure would have passed. He said he didn't question his leaders commitment to fighting for anti-abortion rights bills and said he had their "word of honor" the House would eventually hold a vote on it.