The House voted Tuesday to impose a nationwide ban on abortions after 22 weeks of pregnancy over Democratic objections that the bill represents a dramatic attempt by Republicans to restrict abortion rights.

As expected, the vote fell out mostly along party lines in a 228-196 vote — just six Democrats voted for it, and six Republicans opposed it.

Democrats voting for the bill were Reps. Henry Cuellar (Texas), Dan Lipinski (Ill.), Jim MathesonJim MathesonTrump's budget targets affordable, reliable power Work begins on T infrastructure plan New president, new Congress, new opportunity MORE (Utah), Mike McIntyre (N.C.), Collin Peterson (Minn.) and Nick RahallNick RahallWest Virginia is no longer Clinton country Solution needed: Rail congestion is stifling economic growth Lobbying World MORE (W.Va.). Republicans voting against it were Reps. Paul BrounPaul BrounCalifornia lawmaker's chief of staff resigns after indictment Republican candidates run against ghost of John Boehner The Trail 2016: Let’s have another debate! MORE (Ga.), Charlie Dent (Pa.), Rodney FrelinghuysenRodney FrelinghuysenGOP lawmaker faces ethics complaint after writing letter to activist’s employer GOP rep goes after activist by writing letter to employer GOP town halls go viral MORE (N.J.), Richard Hanna (N.Y.), Jon Runyan (N.J.) and Rob WoodallRob WoodallGOP flashes stop sign at Trump on gas tax Dem seeks to delay tax reform until after review of Trump's returns The Hill's Whip List: 36 GOP no votes on ObamaCare repeal plan MORE (Ga.).

With limited exceptions, the legislation would ban the abortion of a fetus older than 20 weeks old, or at 22 weeks of pregnancy under a different measuring system. The ban would be backed by possible fines against doctors, as well as prison sentences of as many as five years.

As controversial as the bill is, however, today's House vote likely ends the process in Congress, as the Democratic Senate is not expected to consider it at all. President Obama threatened to veto the measure on Monday.

More from The Hill:
• Alexander: Reid won't go 'nuclear,' fears Yucca vote
• Republican slams pro-Obama group for listing 'climate deniers'
• Truckers push Obama to delay mandate or 70-hour driving week
• Bill would require agencies to weigh costs of new rules
• Partisan lines harden on immigration
• Allen West open to primary challenge against Rubio

Debate on the bill was tense on the House floor from the start, when Democrats asked why Rep. Marsha BlackburnMarsha BlackburnNew GOP bill may revive internet privacy fight Overnight Cybersecurity: Bad Russian intel may have swayed Comey's handling of Clinton probe | Apple sees spike in data requests | More subpoenas for Flynn | DOJ's plan for data warrants Overnight Tech: Internet lobby criticizes GOP privacy bill | Apple sees security requests for user data skyrocket | Airbnb beefs up lobbying MORE (R-Tenn.) — who does not sit on the bill's committee of jurisdiction — was managing the bill. Judiciary Committee Chairman Bob GoodlatteBob GoodlatteTech giants urge Congress to revise foreign surveillance law Top Dem calls for investigation into Sessions House votes to expand death penalty for police killings MORE (R-Va.) said it is acceptable under the rules of the House to allow "appropriate" people to manage the bill.

But several Democrats suggested it's because the sponsor of the bill, Rep. Trent FranksTrent FranksGOP leaders launch internal review into leak GOP rep blames ‘the left’ for ‘tense, confrontational approach’ America must reduce its vulnerability to OPEC actions MORE (R-Ariz.), made the controversial comment last week that rape usually doesn't result in pregnancy. Franks is on the Judiciary Committee, but he never spoke about his own bill during the hour-long debate.

They also said it was because Republicans have no women on the committee of jurisdiction and wanted to put a woman's face on the bill; Republicans never answered that charge.

Democrats said the lack of any input from women on the committee showed in the final product, and argued that the final bill is based on faulty science. Republican supporters of the bill, including women Republicans, said studies have shown that a fetus can feel pain at 20 weeks.

"H.R. 1797 is based on undisputed scientific evidence which tells us that unborn children at 20 weeks and older can feel pain," Rep. Diane BlackDiane BlackGowdy front-runner to be next Oversight chairman Female lawmakers flee House for higher office, retirement House GOP not sold on Ryan’s tax reform plan MORE (R-Tenn.) said. "These are babies. They can feel pain."

But Democrats said the GOP failed to show conclusive evidence for that claim. Rep. Debbie Wasserman Schultz (D-Fla.) said Republicans are repeating a talking point that is not widely agreed among doctors.

"It is clear that the members who approved this bill, the all-male Republican members on the House Judiciary Committee, are not only disinterested in protecting the well-being of women, but are also disinterested in the professional opinion of the medical community," she said.

Republicans said a major reason the bill is needed is to tighten abortion law in light of the Dr. Kermit Gosnell trial, in which the Pennsylvania abortion doctor was convicted of murdering several infants born alive after failed abortions.

It was also charged during the gruesome trial that Gosnell put women's health at risk by performing abortions in an unsterile environment.

"This is an area that has overwhelming public support, and it is indeed an appropriate response to Kermit Gosnell's house of horrors," Blackburn said. "What this does is to limit abortion at the sixth month of pregnancy, and includes exceptions, so that we can send the clearest possible message to the American people that we do not support more Gosnell-like abortions."

"His actions have made debates like this more important than ever before, because under the guise of being a medical professional … Dr. Gosnell violently ended the life of viable unborn babies," Rep. Michele BachmannMichele Bachmann'Real Housewives' producer 'begging' Conway to join cast Ex-rep admires furs amid PETA inaugural gala Why Republicans took aim at an ethics watchdog MORE (R-Minn.) added.

Democrats countered that the Gosnell trial is irrelevant, as the doctor has been successfully convicted under current law.

"I would just like to note that we do not need to change the law," Rep. Zoe Lofgren (D-Calif.) said. "Dr. Gosnell is convicted, and he's doing two life sentences in prison for murder under current law."

The legislation includes some exceptions to the ban, including when an abortion is needed to save the life of the mother, or when the pregnancy is the result of rape or incest. But the latter exceptions were only added by the House Rules Committee at the last minute — the House Judiciary Committee passed the bill after defeating amendments to add these exceptions.

In addition, the rape and incest exceptions are conditioned on women reporting these incidents to authorities. Democrats blasted that language as being divorced from reality, since many women don't report sexual assault. Several Democrats said that language shows Republicans don't trust women to tell the truth when telling their doctor why they want an abortion.

"In short, the majority has determined that a woman's word is not enough to prove that she has been raped or the victim of incest," Judiciary Committee ranking member John Conyers Jr. (D-Mich.) said.

"The only reason we have been given by the supporters of this bill is that women lie about having been raped," Rep. Jerrold Nadler (D-N.Y.) added.

There was also some debate over the constitutionality of the bill. Democrats said it goes against the precedent set by Roe v. Wade that women have abortion rights before fetal viability, defined at between 24 and 27 weeks.

"This bill would deny care to women in the most desperate circumstances," Minority Leader Nancy Pelosi (D-Calif.) said. "It is disrespectful to women, it is unsafe for families, and it is unconstitutional."

Republicans countered that the Supreme Court has also said that Congress has the right to speak through legislation on the issue of abortion. Goodlatte said the Court ruled in 2007 that "the government may use its voice and its regulatory authority to show its profound respect for the life within the woman, and that Congress may show such respect for the unborn through specific regulation, because it implicates additional ethical and moral concerns that justify a special prohibition."