Tennessee lawmakers on Wednesday gave final legislative approval to a proposed 20-week abortion ban that now heads to Gov. Bill Haslam and would create one of the most stringent abortion laws in the nation.

The House voted along nearly party lines after a lengthy debate. The sponsor, Rep. Matthew Hill, R-Jonesborough, said the bill is similar to laws in 20 other states that prohibit abortion after 20 weeks of pregnancy.

The bill would require a test for viability and gestational age before a doctor could perform an abortion and would subject doctors who violate the law to a felony charge that can carry up to 15 years in prison.

The Senate passed the bill on Monday.

State Attorney General Herbert Slatery said in an opinion that it and another abortion-related bill that was filed this year were “constitutionally suspect,” but was prepared to defend the law if challenged in court.

Slatery also declined to enforce two other abortion-related measures.

The Tennessee Medical Association, a group that represents and lobbies on behalf of physicians has been neutral on the issue.