Abortion is already legal under state law in Massachusetts — but that didn’t stop abortion rights advocates from pushing through a bill last week to formally repeal the state’s 173-year-old law against “procuring a miscarriage” that remained on the books.

The NASTY Women Act (Negating Archaic Statutes Targeting Young Women) passed in a landslide and is expected to be signed by Republican Gov. Charlie Baker. It will make Massachusetts the first state to respond to the possibility that Roe v. Wade – the landmark U.S. Supreme Court decision that legalized abortion in America – could be repealed or significantly weakened following the retirement of Justice Anthony Kennedy.

Massachusetts State Senate President Harriette Chandler tells TIME that women in the state legislature have wanted to pass similar legislation for six years, but that Kennedy’s retirement from the Supreme Court hastened the process.

“I think people are beginning to realize these are strange times we live in. Nothing is impossible, and we’ve got to have a ‘plan B.’ If these laws are enforced, what do we do?” Chandler, a Democrat, says. “We’re not willing to sit back and say, ‘Well, it’s not going to happen here.’ The word for that is denial.”

Other states are following suit. Lawmakers in New Mexico said that they would make repealing the state’s abortion ban a priority in their next legislative session. Democratic Governor Andrew Cuomo called on state lawmakers to hold a special session to codify abortion rights protections into state law.

When Kennedy announced his retirement from the Supreme Court last month, activists on both sides of the abortion debate predicted that his replacement could give the court enough votes to overturn or curb the abortion rights protections guaranteed under Roe v. Wade. President Donald Trump’s nominee, Brett Kavanaugh, has not explicitly shared his views on abortion rights, but pro-abortion rights activists have criticized his record on the issue.

Some red states have been preparing for a possible repeal of Roe v. Wade for years. Four states already have “trigger laws” that would automatically make abortion illegal in the event the Supreme Court decision is overturned, according to the Guttmacher Institute, a policy and research organization that advocates for reproductive rights.

In November, voters in West Virginia and Alabama will decide on initiatives to ban or further limit abortion rights. Alabama’s ballot initiative would also give constitutional rights to fetuses. Both initiatives had been in the works before Kennedy’s retirement announcement, but the news gives the measures new urgency, activists say.

Massachusetts is one of ten states that has a pre-Roe abortion ban still on the books, according to the Guttmacher Institute. But a 1981 state Supreme Court case ruled that the state’s constitution gave women the right to get an abortion.

Critics say Massachusetts’ NASTY Women Act is unnecessary. C.J. Doyle, the executive director of the Catholic Action League of Massachusetts, says that abortion rights are safe in the state, considering the 1981 ruling and the Democratic party’s hold over both chambers of the state’s legislature.

“This is one of the most homogenous pro-abortion states in the union… This whole legislation is an exercise in posturing and pandering,” Doyle says. “We’re a very long way from overturning Roe v Wade. To listen to some of the rhetoric, you will think that the day after Kavanaugh is confirmed, it will be overturned.”

Rebecca Hart Holder, the president of NARAL Pro-Choice Massachusetts, tells TIME said that even though Massachusetts has a record of supporting abortion rights, those rights are never guaranteed. She points to a 2007 case in which an 18-year-old Dominican immigrant was charged with procuring a miscarriage after taking three Misoprostol pills, which are used in medical abortions. (The woman pleaded not guilty, and a judge later ordered her to undergo mental health treatment.)

“I think there’s a perception that we’re always going to be safe — we have these rights, they’re taken for granted, and we don’t have to be as vigilant as other states that you perceive as posing a clear and present danger to abortion access,” Holder said. “But the reality is any state can have a threat to abortion care.”

In conservative states where abortion rights are likely to be eliminated or severely limited if Roe were to be overturned, local organizers are working to make sure they still have a game plan to ensure women will still have ways to get safe abortions.

In states like Massachusetts, where anti-abortion legislation seems unlikely to pass, anti-abortion advocates are pursuing a different strategy.

“Our game plan is to more vigorously pursue education on this and jumpstart a civic conversation about the dignity of every human life,” David Franks, the chairman of the board for Massachusetts Citizens for Life, says. “If Roe were to be overturned, every state in the union would have to have this conversation. We are gearing up for that with educational initiatives.”

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Samantha Cooney at samantha.cooney@time.com.