The legislation would remove a general exception for a women’s health from a current state law banning abortions of viable fetuses. Instead, the legislation would allow such abortions only when the woman’s life is endangered or when pregnancy risks permanent damage to a major bodily function.

Senators passed the bill 27-5 Thursday, sending it to the House. Representative already have passed their own bill, which is pending in the Senate. Both chambers must agree on the same version for the bill to go to the governor.

The state health department says 6,881 abortions occurred in Missouri in 2009. Sixty-three were on fetuses at least 21 weeks old, but none were reported as being viable.