Correction: An earlier version of this article misidentified House Speaker John A. Boehner (R-Ohio) as the House majority leader. This version has been corrected.

Rep. Trent Franks, R-Ariz., center, speaks during a news conference on the late-term abortion ban Wednesday. (Susan Walsh/AP)

The House on Wednesday passed a ban on abortions after 20 weeks of gestation, reviving a measure that had been abandoned earlier this year over concerns that it could hurt the Republican Party’s standing among female voters.

The bill, which House Speaker John A. Boehner (R-Ohio) in a floor speech called “the most pro-life legislation to ever come before this body,” passed with the support of some GOP congresswomen who previously objected to the ban’s restrictions on rape victims. The female lawmakers threw their support behind the measure after that wording was tweaked.

The bill seeks to ban any abortions beyond the midpoint of pregnancy — before a fetus is typically deemed viable, but after antiabortion activists say the fetus can feel pain. It faces an uphill course in the Senate, and President Obama has said he would veto it. But House passage of the measure had been a priority for antiabortion groups hoping to push the needle on public opinion and inject the issue into the 2016 presidential race.

“This legislation to protect the most innocent among us is an opportunity for clarity heading into the 2016 elections,” said Marjorie Dannenfelser, president of the antiabortion Susan B. Anthony List. “Protecting pain-capable babies and mothers at risk during a late-term abortion is a winning issue and one that has unified the entire Republican presidential field.”

But it received swift condemnation from Democrats, including Hillary Rodham Clinton. “The bill puts women’s health and rights at risk, undermines the role doctors play in health care decisions, burdens survivors of sexual assault, and is not based on sound science,” Maya Harris, senior policy adviser for Clinton’s campaign, said in a statement.

The legislation provides exceptions for victims of rape and incest, but the original version required rape victims to have reported the crime — a standard that critics viewed as too stringent because many never go to the police.

The version that passed on Wednesday removed the reporting requirement. But it added a 48-hour waiting period for rape victims during which they must undergo counseling. Abortion rights groups said that requirement makes the bill more burdensome than the original version.

“Congress should defeat this dangerous and misguided bill and focus on moving forward, not backward,” Cecile Richards, president of the Planned Parenthood Federation of America, told reporters earlier in the day in a teleconference.

Still, the change apparently satisfied some of the antiabortion lawmakers who balked at the original version, including Rep. Jackie Walorski (R-Ind.), who had removed her name as a co-sponsor of the bill in January. This bill “protects life, empowers women and will save lives,” Walorski said before casting a yes vote.

The question of whether fetuses feel pain at 20 weeks is controversial. Abortion foes cite studies that show fetuses have stress responses and recoil from negative stimuli early in the womb, though most medical experts say the fetuses’ brains have not developed enough to register pain as it is typically understood.

In the 1973 Roe v. Wade case, the Supreme Court legalized abortion to the point when a fetus can survive outside of the womb. Most physicians peg viability at about 24 weeks, though a study in the New England Journal of Medicine last week suggested that a small percentage of fetuses can survive with medical intervention at 22 weeks.

Ten states have enacted bans on abortion after 20 weeks of gestation, according to the Guttmacher Institute, a research organization that supports reproductive rights. West Virginia will become the 11th state when a law passed by the legislature goes into effect June 4. In an additional three states, similar measures have been blocked by the courts as a result of legal challenges.