The Republican-controlled House passed legislation Tuesday that would ban abortions after 20 weeks of pregnancy, offering social conservatives a symbolic victory even as the bill is all but certain not to become law.

The vote was 228-196, with six Democrats and all but six Republicans voting for the measure.

But the legislation, sponsored by Rep. Trent Franks of Arizona, has virtually no chance of becoming law, with the Democratic-led Senate certain to ignore it and the White House threatening in scathing language to veto it.

Republican House Speaker John Boehner touches on a vote Tuesday regarding a ban on abortions after 20 weeks.

The bill, called the "Pain-Capable Unborn Child Protection Act," would outlaw abortions after 20 weeks, unless the life of the mother is at risk. The legislation cites studies which indicate that a fetus feels pain starting at this gestational threshold; supporters of the bill say this medical research dictates that these fetuses should therefore not be aborted.

The vote came after Republicans – facing criticism over an alleged gaffe by bill sponsor Franks - altered their strategy to argue to bill, sidelining the Arizona lawmaker as the leader of the debate in favor of highlighting Republican women who support the ban.

House leaders also added language to the legislation last week after Franks stated that “the incidence of rape resulting in pregnancy are very low.” Democrats compared that assertion to one made by then-Senate candidate Todd Akin, who suggested last year that women who are victims of “legitimate rape” often experience a physical, biological reaction to the trauma, preventing pregnancy.

Under the changed bill, pregnancies that are the result of rape or incest -- and are reported to authorities -- are excluded from the ban.

The vote also comes in the wake of a murder conviction for Kermit Gosnell, an abortion provider found guilty of murder for performing illegal late-term abortions.

Responding to criticism Tuesday that the House should be focused on economic issues instead of the largely symbolic abortion vote, Republican House Speaker John Boehner pointed to the Gosnell trial as evidence that taking up the abortion ban is warranted.

“After this Kermit Gosnell trial and some of the horrific acts that were going on, the vast majority of the American people believe in the substance of this bill and so do I,” he said.

And Rep. Marsha Blackburn, R-Tenn., argued on the House floor that the bill would send the "clearest possible message to the American people that we do not support more Gosnell-like abortions."

While the vote offered a chance for members from socially conservative districts to flex their political muscles, some moderate Republicans grumbled about the leadership’s decision to hold a vote on a controversial measure with no chance of going beyond the House.

“I think a lot of people are shaking their heads and not understanding why we’re doing this,” said one GOP official, who added that votes on hot-button social issues don’t help the party maintain much-needed Republican seats in moderate districts.

Republican Rep. Charlie Dent of Pennsylvania bluntly told The New York Times that the vote is “a stupid idea.”

“The economy is on everybody’s minds. We’re seeing stagnant job numbers. Confidence in the institution, in government, is eroding,” said Dent, a moderate whose southeastern Pennsylvania district only narrowly voted for Romney last year after voting for President Barack Obama in 2008. “And now we’re going to have a debate on rape and abortion.”

Last year, the House considered a similar piece of legislation that achieved the same ban, but applied only to the District of Columbia and did not include the exception for rape or incest. That bill achieved a simple majority (220-154), but ultimately failed because it needed a two-thirds majority for passage.

Last week, the White House made clear that it would veto the legislation, calling it an “assault” on women’s rights and a direct violation of the Supreme Court’s rulings.

“Forty years ago, the Supreme Court affirmed a woman's constitutional right to privacy, including the right to choose,” the administration said in a statement. “This bill is a direct challenge to Roe v. Wade and shows contempt for women's health and rights, the role doctors play in their patients' health care decisions, and the Constitution.”

NBC’s Jessica Taylor and Frank Thorp contributed to this report.

This story was originally published on