Sixteen- and 17-year-olds would no longer need a parent's or judge's permission to have an abortion under a measure passed by the state Senate Wednesday which would also allow the procedure after 24 weeks in cases of lethal prenatal defects.

Sponsor Sen. Harriette Chandler said abortion in Massachusetts was made legal by court decisions, not by an explicit state law and those rights could be threatened by a U.S. Supreme Court hostile to Roe vs. Wade.

"These are a collection of policies that I have always believed would be necessary if reproductive rights faced the worst case scenario," Chandler said, "if the U.S. Supreme Court majority turned solidly hostile toward the right to choose abortion. Well, that worst case seems to now be a reality."

The state Senate joined the House in passing the abortion expansion amendment 33 to 7. Democrats in both chambers have enough votes to override Gov. Charlie Baker should he veto the abortion provision.

The amendment, based on the "ROE Act" bill supported by Chandler, would let residents over the age of 16 have an abortion without having to go through a court procedure or by gaining a parent's permission.

"It aligns the age of the young person can consent to sex with the age they can make the decision to terminate a pregnancy," Chandler said.