The House approved legislation Tuesday that would ban abortions starting at 20 weeks of pregnancy, the most sweeping abortion restriction to pass any chamber of Congress in a decade. The vote was 228 to 196.

While the measure is unlikely to become law — it faces opposition in the Senate and a White House veto threat — it could reverberate politically over the next year and a half, as both Republicans and Democrats appeal to voters in this year’s special elections and the 2014 midterms.

The vote was mostly along party lines, with just six Republicans voting with Democrats against it and six Democrats voting with Republicans in its favor.

Authored by Rep. Trent Franks (R-Ariz.), the Pain-Capable Unborn Child Protection Act aims to capitalize on the public outrage surrounding Kermit Gosnell, the Philadelphia abortion provider who was convicted last month of first-degree murder in the case of three babies born alive in his clinic. The jury also convicted him of involuntary manslaughter in the 2009 death of 41-year-old Karnamaya Mongar of Virginia, who died from a drug overdose while undergoing an abortion at his clinic.

While Republicans have pushed for a series of limits on abortion over the past 10 years — including successfully barring the D.C. government from using its own money to pay for abortions since 2011 — Tuesday’s vote marks the first time Congress has voted to redefine the point where a fetus becomes viable.

See abortion laws by state

Under the 1973 Supreme Court decision Roe v. Wade, abortions can be performed until the point when an individual doctor determines a fetus’s viability, which is generally defined as up to 24 weeks of gestation. After that point, the government can prohibit the procedure as long as it provides sufficient safeguards for the mother’s health and well-being.

Marjorie Dannenfelser, president of the Susan B. Anthony List, an antiabortion political action committee, called the vote “historic” and noted that in the past decade, Congress had restricted abortion votes to issues such as federal funding and parental consent.

“For the first time since Roe v. Wade, we will protect that child’s life after a certain point,” Dannenfelser said in a phone call with reporters.

The vote comes as antiabortion legislation has gained traction on the state level, buoyed by Republican gains in both legislatures and governorships. This year, 14 states — Alabama, Alaska, Arkansas, Colorado, Georgia, Indiana, Kansas, Missouri, Mississippi, Montana, North Dakota, Oklahoma, South Dakota and Utah — have enacted 32 measures imposing new restrictions on abortions, according to NARAL Pro-Choice America.

Rep. Zoe Lofgren (D-Calif.), who managed the legislation for the Democrats on the House floor, called Franks’s bill “an unconscionable attack on our constitutional freedoms.”

The House vote underscores how polarized the two parties are on abortion, even as they may be moving closer together on immigration and a small number of other social questions. And that is particularly important, given next week’s special election in Massachusetts to fill the former Senate seat of Secretary of State John F. Kerry, and the New Jersey special election slated for this fall to fill the vacancy left by the death of Sen. Frank R. Lautenberg (D).

“We’re confident that the 40 solidly pro-choice members of the Senate can keep this bill from reaching President Obama’s desk,” said NARAL spokeswoman Samantha Gordon. “However, this year’s election cycle leaves two formerly pro-choice Senate seats up for grabs, which could tip the vote on any future anti-choice bills in the other direction.”

Last-minute changes to the bill sparked divisions within the GOP, as well as public controversy over how rape should be defined. The House Judiciary Committee rejected an attempt last week to provide exemptions in the cases of rape and incest; during the debate, Franks said “the incidence of rape resulting in pregnancy are very low.”

Afterward, GOP leaders amended the bill to make exceptions if a woman is raped and reports it within 48 hours, or if a minor is the victim of incest. That prompted Rep. Paul C. Broun (R-Ga.) to remove his name as co-sponsor, saying he was “extremely disappointed that House Republican leadership chose to include language to subject some unborn children to needless pain and suffering.”

Rep. Diana DeGette (D-Colo.), one of the leading proponents of abortion rights in the House, said in an interview that the bill “shows to me the Republicans learned absolutely nothing from the election last year. The whole election was about women realizing that Republicans don’t care about their health-care decision-making, and don’t trust them to do that.”

The floor lineup reflected Republicans’ ongoing effort to appeal to women. While all the GOP members of the House Judiciary Committee — which has jurisdiction over the measure — are men, Rep. Marsha Blackburn (R-Tenn.) managed the bill. A slew of female lawmakers dominated the GOP’s speaker roster during the opening of the debate, with several of them invoking their experience as mothers and nurses to argue that technological advances had redefined the point of viability since 1973.

“There are medical reasons for this,” said Rep. Diane Black (R-Tenn.).

Meanwhile, Democrats such as House Minority Leader Nancy Pelosi (Calif.) described the measure as a distraction from pressing issues such as the economy. Americans, she said, would tune in to see “bills that are going nowhere” and will think, “Another day without a jobs bill, another day without a budget amendment, another day ignoring the top priorities of the American people by the Republican majority.”

After Pelosi called the bill “dangerous and wrong,” Blackman retorted, “Let me tell you what is dangerous and wrong — condoning the actions of Kermit Gosnell.”

In its veto threat, the White House made it clear the president would not tolerate a significant scaling back of abortion access in the United States. The bill, it stated, “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.”