Kansas voters on Tuesday protected the right to get an abortion in their state, rejecting a measure that would have allowed their Republican-controlled Legislature to tighten abortion restrictions or ban it outright.

The referendum in the conservative state was the first test of U.S. voter sentiment about abortion rights since the Supreme Court overturned Roe v. Wade in June. It was a major victory for abortion rights advocates following weeks in which many states in the South and Midwest largely banned abortion.

Voters rejected a proposed amendment to the Kansas Constitution that would have added language stating that it does not grant the right to abortion. A 2019 state Supreme Court decision declared that access to abortion is a “fundamental” right under the state’s Bill of Rights, preventing a ban and potentially thwarting legislative efforts to enact new restrictions.

The referendum was closely watched as a barometer of liberal and moderate voters’ anger over the June ruling scrapping the nationwide right to abortion. The measure’s failure also was significant because of how conservative Kansas is and how twice as many Republicans as Democrats have voted in its August primaries in the decade leading up to Tuesday night’s tilt.

Kristy Winter, 52, a Kansas City-area teacher and unaffiliated voter, voted against the measure and brought her 16-year-old daughter with her to her polling place.

“I want her to have the same right to do what she feels is necessary, mostly in the case of rape or incest,” she said. “I want her to have the same rights my mother has had most of her life.”

Opponents of the measure predicted that the anti-abortion groups and lawmakers behind the measure would push quickly for an abortion ban if voters approved it. Before the vote, the measure’s supporters refused to say whether they would pursue a ban as they appealed to voters who supported both some restrictions and some access to abortion.

Stephanie Kostreva, a 40-year-old school nurse from the Kansas City area and a Democrat, said she voted in favor of the measure because she is a Christian and believes life begins at conception.

“I’m not full scale that there should never be an abortion,” she said. “I know there are medical emergencies, and when the mother’s life is in danger there is no reason for two people to die.”

An anonymous group sent a misleading text Monday to Kansas voters telling them to “vote yes” to protect choice, but it was suspended late Monday from the Twilio messaging platform it was using, a spokesperson said. Twilio did not identify the sender.

The 2019 Kansas Supreme Court decision protecting abortion rights blocked a law that banned the most common second-trimester procedure, and another law imposing special health regulations on abortion providers also is on hold. Abortion opponents argued that all of the state’s existing restrictions were in danger, though some legal scholars found that argument dubious. Kansas doesn’t ban most abortions until the 22nd week of pregnancy.

Backers of the measure began with advantage because anti-abortion lawmakers set the vote for primary election day, when for the past 10 years Republicans have cast twice as many ballots as Democrats. But the early-voting electorate was more Democratic than usual.

The Kansas vote is the start of what could be a long-running series of legal battles playing out where lawmakers are more conservative on abortion than governors or state courts. Kentucky will vote in November on whether to add language similar to Kansas’ to its state constitution.

Meanwhile, Vermont will decide in November whether to add an abortion rights provision to its constitution. A similar question is likely headed to the November ballot in Michigan.

In Kansas, both sides together spent more than $14 million on their campaigns. Abortion providers and abortion rights groups were key donors to the “no” side, while Catholic dioceses heavily funded the “yes” campaign.

The state has had strong anti-abortion majorities in its Legislature for 30 years, but voters have regularly elected Democratic governors, including Laura Kelly in 2018. She opposed the proposed amendment, saying changing the state constitution would “throw the state back into the Dark Ages.”

State Attorney General Derek Schmidt, a Republican hoping to unseat Kelly, supported the proposed constitutional amendment. He told the Catholic television network EWTN before the election that “there’s still room for progress” in decreasing abortions, without spelling out what he would sign as governor.

Although abortion opponents pushed almost annually for new restrictions until the 2019 state Supreme Court ruling, they felt constrained by past court rulings and Democratic governors like Kelly.