TOPEKA, Kan. (AP) — Immigration hardliner Kris Kobach is in a close race in the Republican primary for Kansas attorney general against a state senator as he attempts a political comeback.

Kobach was battling state Sen. Kellie Warren for the nomination in Tuesday’s election. Both promised to file lawsuits to challenge policies of Democratic President Joe Biden’s administration.

Kobach built a national profile by writing tough state and local immigration rules outside Kansas even before he was elected Kansas’ secretary of state in 2010. But he lost his bid for governor in 2018 to Democrat Laura Kelly and lost the Republican primary for U.S. Senate in 2020, raising questions about his viability in a statewide race.