Massachusetts' legislature overrode its Republican governor's veto of a bill on Tuesday that expanded abortion access in a variety of ways, including allowing 16-year-old girls to obtain abortions without parental consent.

Passed earlier this month, the bill codified the landmark decision in Roe v. Wade and allows abortions after 24 weeks if the child isn't expected to survive after birth. Gov. Charlie Baker said that while he agreed with some of the bill's provisions, he couldn't get behind one that lowered the age of consent from 18 to 16 years of age for obtaining the procedure.

Baker told lawmakers he supported the provision allowing abortions at 24 weeks and eliminating a 24-hour waiting period, according to WBUR.

"However, I cannot support the sections of this proposal that expand the availability of later term abortions and permit minors age 16 and 17 to get an abortion without the consent of a parent or guardian,"  he reportedly said.

TRUMP ADMINISTRATION BLOCKS FUNDING FOR CALIFORNIA, BRINGS DOJ SUIT OVER ABORTION ISSUES

The governor would have wanted a revision of the 24-week provision to allow abortions if a medical professional foresaw "a substantial risk to" the patient's physical or mental health. As passed, the bill's language allowed abortions "if it is necessary, in the best medical judgment of the physician, to preserve the patient's physical or mental health."

The state's Democratic-controlled Senate and House overwhelmingly rejected Baker's veto. The Senate's 32-8 vote came just a day after the House's vote of 107-46.

Tuesday's passage represents another win for Democrats who are seeking to pre-empt a potential Supreme Court decision overturning Roe -- a prospect that seemed even more likely with Amy Coney Barrett's confirmation to the Supreme Court.

Massachusetts' law encountered opposition from groups like Catholic Action League and Massachusetts Citizens for Life. In a statement released Tuesday, the anti-abortion group Susan B. Anthony List blasted the law.

FACEBOOK REVERSING BAN ON AD THAT CLAIMED BIDEN-HARRIS SUPPORTED 'ABORTION UP TO THE MOMENT OF BIRTH'

"This dangerous new law allows for late-term abortion on-demand across Massachusetts, and secret abortions for minor girls as young as 16," said SBA List President Marjorie Dannenfelser. "Governor Baker is pro-choice, but this legislation was too much for him to stomach: his veto exemplifies just how extreme it is."

CLICK HERE TO GET THE FOX NEWS APP

"The actions taken by Democrats to ram through this legislation are a reflection of just how extreme the party has become on abortion. Led by Joe Biden, Kamala Harris, Chuck Schumer, and Nancy Pelosi, the Democrats’ agenda for the entire nation is reflected in this bill: abortion on-demand, up until the moment of birth."

Meanwhile, the bill found support from NARAL Pro-Choice Massachusetts, which touted it as a win for women's rights. "Today gender equality took a massive step forward," tweeted Rebecca Hart Holder, the group's executive director.

The Associated Press contributed to this report.