Updated

The Democratic candidate for Senate in Kansas, who is now fighting to drop out of the race, recently spoke with Missouri Sen. Claire McCaskill, who according to reports urged him to withdraw.

A McCaskill spokeswoman confirmed to FoxNews.com Thursday that the Democratic senator did speak with Chad Taylor, but declined to comment on what they spoke about.

However, according to multiple reports, Taylor's decision to drop out of the race was made after speaking with McCaskill, who according to one, did so to try and unify support behind independent candidate Greg Orman against incumbent GOP Sen. Pat Roberts.

Taylor, a district attorney, abruptly dropped out of the race against Roberts Wednesday with no explanation, leaving Orman as the only viable competition to the three-term Republican.

However, in another twist, Kansas Secretary of State Kris Kobach said Thursday Taylor must remain on the ballot despite his wishes. Kobach said Taylor did not comply with state law because he did not formally declare that he would be unable to serve if elected.

Kobach said Taylor's only recourse is filing a lawsuit.

Taylor said Thursday he will challenge the ruling. He said in a statement that he was assured by a top Kobach aide that a letter he sent to the secretary of state's office was sufficient for withdrawing, which Kobach said is not the case.

The Roberts campaign immediately alleged a "corrupt bargain" had been struck between Democratic leaders and Orman's campaign, and said Orman's independent status is "a smoke screen."

Taylor issued a separate statement saying he made the decision after consulting with his staff, supporters and Democratic Party leaders, but did not give a reason for dropping out.

The Kansas City Star reported Thursday that McCaskill personally urged Taylor to step aside.

The McCaskill spokeswoman told FoxNews.com the senator believes Taylor has a bright future in politics, and that she recognizes decisions of this nature can be hard and personal.

“I was happy to visit with Chad Taylor as he wrestled with a difficult decision,” McCaskill said in a written statement Thursday obtained by the Kansas City Star. “He is a respected prosecutor, a great guy and I wish him well.”

Democratic officials, who asked to remain anonymous, also told the Associated Press Thursday that McCaskill spoke with Taylor in an attempt to unify support behind Orman's candidacy. Taylor's spokesman, Brandon Naylor, declined to comment to the Associated Press on McCaskill's role in the candidate's decision.

The maneuvering has landed Orman, a 45-year-old co-founder of a business capital and management services firm from the conservative Kansas City suburb of Olathe, in the national spotlight.

A 2007 Democratic candidate for the same Senate seat, Orman has been registered to vote with both major political parties in the past but is now unaffiliated. He pitches himself as a centrist who can break partisan gridlock — and a promise to caucus with whichever party has the majority in the Senate after the November election.

Orman contributed to the 2008 presidential campaigns of Democrats Barack Obama and Hillary Clinton, but also to moderate Republican Scott Brown's campaign for the U.S. Senate in Massachusetts in 2010.

In a twist of irony, Orman also contributed in the past to McCaskill’s conservative GOP foe in her 2012 bid to retain her seat, Rep. Todd Akin. However, this was years before a comment from Akin about "legitimate rape" torpedoed his bid to unseat McCaskill.

The Associated Press contributed to this report.