House Speaker Tim Miley (D) did not allow members to talk about the measure before voting because legislature had too many bills to vote on, according to the AP.
The bill keeps women from aborting a fetus beyond 20 weeks of gestation unless the fetus is not medically viable or the mother is at risk of death or serious illness. The legislation also requires doctors to report all abortions to the state.
The state senate made multiple failed attempts to move the ban back to 24 weeks after the woman's last menstrual cycle, according to the AP.
Council to the Judiciary Committee warned legislators that similar bans have been ruled unconstitutional by the Supreme Court, and some senators expressed doubt about the bill.
Gov. Earl Ray Tomblin (D) has also expressed concern over the constitutionality of the legislation.
"The abortion bill obviously is one that causes me some concern because even the legislative attorneys and others said they feel this bill is unconstitutional," he said. "I'll be looking at all aspects of it once I receive the bill."
Ten other states have enacted similar measures to ban abortions after 20 weeks of gestation, according to the Washington Post.