TOPEKA, Kan. β€” U.S. Supreme Court Justice Anthony Kennedy's retirement is giving the Kansas governor's race an odd twist by complicating the bid of a major Democratic candidate who's trying to rebuild his party's brand with rural voters but is hindered by his anti-abortion past.

Former state Agriculture Secretary Joshua Svaty argues that Democrats can't break an eight-year losing streak in all statewide races without pulling more votes from strongly Republican rural areas. But he could have trouble winning the Aug. 7 primary because abortion-rights advocates are energized and Svaty voted consistently for anti-abortion measures as a legislator.

Svaty has tried to woo liberal Democrats by pledging to veto any new restrictions on abortion if he's elected governor. But he's facing two major rivals taking stronger abortion-rights stances and has made statements likely to hurt him with more socially conservative voters in the fall.

"He's trying to be in the center of the road β€” where people get run over," said Mary Kay Culp, executive director of the influential anti-abortion group Kansans for Life. "He's got tire marks on the back of his head."

Svaty brushes off the criticism he's getting on both sides.

"Guess where that puts me? Well, probably with the overwhelming majority of Kansans," he said in an interview.

President Donald Trump is expected to nominate a replacement for Kennedy who is receptive to overturning the historic 1973 Roe v. Wade decision β€” something that could give states free rein in setting abortion policies.

"It's incredibly important during the gubernatorial race that we have a nominee that holds the line when it comes to women's reproductive rights," said Julie Burkhart, founder and CEO of the abortion-rights group Trust Women.

Abortion-rights advocates' passion was evident recently in neighboring Missouri, where Democrats amended their state platform to welcome people with diverse views on abortion, prompting a backlash from abortion rights supporters. Kansas Democrats' platform contains no such language.

Illinois Rep. Dan Lipinksi, one of the most conservative Democrats in Congress, narrowly won his March primary race in Chicago after his little-known liberal opponent blasted him for opposing abortion. In Nebraska, anti-abortion Democrat Heath Mello lost the Omaha mayor's race last year after the national party Chairman Tom Perez said every Democrat should support "a woman's right to make her own choices."

"Advocates for sexual and reproductive rights can't afford to risk those rights by backing candidates who don't have a long-term commitment," said Brandon Hill, the president and CEO of Planned Parenthood Great Plains, which operates in Kansas, Missouri, Oklahoma and Arkansas.

One of Svaty's major Democratic rivals, state Sen. Laura Kelly, of Topeka, said she would not only veto new restrictions but seek to roll back restrictions enacted under former Republican Gov. Sam Brownback and current GOP Gov. Jeff Colyer.

"It's not enough to say you won't make it worse," she said.

And Svaty's other major primary foe, former Wichita Mayor Carl Brewer, received loud applause and cheers from about 200 Democrats at a Thursday night forum in Topeka by declaring: "None of us have any damn business telling any woman what she needs to do with her body."

Svaty, from the central Kansas town of Ellsworth, served in the Kansas House from 2003 until being appointed agriculture secretary in August 2009. He was a reliable anti-abortion lawmaker.

He voted for four bills to tighten state regulation of abortion clinics, at least 11 other measures and twice to override vetoes by then-Democratic Gov. Kathleen Sebelius. Svaty argues he acted in line with his GOP-leaning district; his running mate is an ex-Army helicopter pilot and businesswoman who supports abortion rights.

"I think my response and my position has always been a very sensible one," Svaty said. "If people are paying attention, they should find out that I am a very reasonable person on this issue and any others."

Some Democratic voters are willing to hear Svaty out. Tai Edwards, a 37-year-old history professor from Lawrence, said she identifies herself as "pro-choice" but other issues also are important, such as funding for public schools.

"If you live in a state like Kansas, you're used to the complex nuances of how abortion rights exist in a state that's predominantly hostile," she said.

But Sue Hamlin, a 66-year-old lifelong Democrat and retired educator from Topeka, said she definitely wants abortion-rights candidates who are "proactive."

"We've got to make it clear that women get to be in charge of their own bodies and make their own decisions," she said.