TOPEKA, Kan. (AP) — Kansas voters on Tuesday sent a resounding message about their desire to protect abortion rights, rejecting a ballot measure in a conservative state with deep ties to the anti-abortion movement that would have allowed the Republican-controlled Legislature to tighten restrictions or ban the procedure outright.

It was the first test of voter sentiment after the U.S. Supreme Court’s decision in June that overturned the constitutional right to abortion, providing an unexpected result with potential implications for the coming midterm elections.

While it was just one state, the heavy turnout for an August primary that typically favors Republicans was a major victory for abortion rights advocates. With most of the vote counted, they were prevailing by roughly 20 percentage points, with the turnout approaching what’s typical for a fall election for governor.

The vote also provided a dash of hope for Democrats nationwide grasping for a game-changer during an election year otherwise filled with dark omens for their prospects in November.

“This vote makes clear what we know: the majority of Americans agree that women should have access to abortion and should have the right to make their own health care decisions,” President Joe Biden said in a statement.

After calling on Congress to “restore the protections of Roe” in federal law, Biden added, “And, the American people must continue to use their voices to protect the right to women’s health care, including abortion.”

The Kansas vote also provided a warning to Republicans who had celebrated the Supreme Court ruling and were moving swiftly with abortion bans or near-bans in nearly half the states.

“Kansans bluntly rejected anti-abortion politicians’ attempts at creating a reproductive police state,” said Kimberly Inez McGuire, executive director of Unite for Reproductive & Gender Equity. ”Today’s vote was a powerful rebuke and a promise of the mounting resistance.”

The proposed amendment to the Kansas Constitution 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 Supreme Court’s ruling scrapping the nationwide right to abortion. In Kansas, abortion opponents wouldn’t say what legislation they’d pursue if the amendment were passed and bristled when opponents predicted it would lead to a ban.

Mallory Carroll, a spokesperson for the national anti-abortion group Susan B. Anthony Pro-Life America, described the vote as “a huge disappointment” for the movement and called on anti-abortion candidates to “go on the offensive.”

She added that after the U.S. Supreme Court ruling, “We must work exponentially harder to achieve and maintain protections for unborn children and their mothers.”

The measure’s failure also was significant because of Kansas’ connections to anti-abortion activists. Anti-abortion “Summer of Mercy” protests in 1991 inspired abortion opponents to take over the Kansas Republican Party and make the Legislature more conservative. They were there because Dr. George Tiller’s clinic was among the few in the U.S. known to do abortions late in pregnancy, and he was murdered in 2009 by an anti-abortion extremist.

Anti-abortion lawmakers wanted to have the vote coincide with the state’s August primary, arguing they wanted to make sure it got the focus, though others saw it as an obvious attempt to boost their chances of winning. Twice as many Republicans as Democrats have voted in the state’s August primaries in the decade leading up to Tuesday’s election.

“This outcome is a temporary setback, and our dedicated fight to value women and babies is far from over,” said Emily Massey, a spokesperson for the pro-amendment campaign.

The electorate in Tuesday’s vote wasn’t typical for a Kansas primary, particularly because tens of thousands of unaffiliated voters cast ballots.

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.