In another huge twist in the Kansas Senate race, Kansas Secretary of State Kris Kobach (R) said Thursday that Democratic Senate candidate Chad Taylor must remain on the ballot despite his declaration that he would withdraw from the race.

Taylor announced Wednesday that he would drop out of the race and he filed paperwork with Kobach’s office to officially withdraw. That would have pitted independent candidate Greg Orman against incumbent Sen. Pat Roberts (R-KS). Taylor’s withdrawal was seen as a maneuver by Democrats because Orman, who was once a Democrat, had been shown polling ahead of Roberts and said he was open to caucusing with either party.

During a televised press conference Thursday afternoon, Kobach read from the relevant Kansas law, specifically the provision that states a candidate must declare “they are incapable of fulfilling the duties of office if elected.” He said that Taylor had not made such a declaration.

“We now have no choice but to keep his name on the ballot,” Kobach said.

According to a statement published by the Washington Post, Taylor said he had consulted with Kobach’s office in drafting his paperwork to withdraw his name from the ballot. Taylor said he had spoken specifically with Brad Bryant, director of elections and legislative matters in the secretary of state’s office.

“I again confirmed with Mr. Bryant that this notarized letter removed my name from the ballot,” Taylor said. “He again said ‘Yes.'”

Kobach was asked about Taylor’s statement after announcing his decision Thursday.

“At no time did Mr. Bryant state that the filing that Mr. Taylor gave was sufficient,” Kobach said.

Kobach is a member of Republican candidate Roberts’s honorary campaign committee, according to Roberts’s campaign.

It’s not clear what the next step is for Taylor, or Democrats. The abrupt move to withdraw had thrown the race into disarray and prompted national Republicans to seize control of the Roberts campaign to avert a disastrous and unexpected loss that could undermine the GOP’s efforts to win back the Senate majority.

Kobach acknowledged that a legal challenge could follow his decision. “The courts are always available,” he said.