The West Virginia Supreme Court on Wednesday rejected a last-ditch bid by former coal CEO Don Blankenship to get his name on the ballot in November's U.S. Senate race.

Blankenship, who finished third in May's Republican Senate primary, had applied to appear on the ballot as a third-party candidate. West Virginia's secretary of state had blocked Blankenship's bid due to the state's "sore loser" law, which prohibits defeated major-party candidates from switching to a minor party.

The case was heard by a court in upheaval. One of the judges who heard Blankenship's case was filling in for a suspended justice, while two others sat in for justices who retired after lawmakers voted to impeach them.

Blankenship had argued that the sore loser law was applied to him retroactively. He said lawmakers clarified the law earlier this year and it didn't become effective until June, after he had begun the process of running as a candidate for the Constitution Party.

The secretary of state's office said Blankenship didn't file a certificate of candidacy until late July.

The Senate race pits incumbent Democratic Sen. Joe Manchin against Republican state Attorney General Patrick Morrisey. Libertarian candidate Rusty Hollen is also on the ballot.

In a statement, Blankenship called the decision "frightening."

"Essentially, the Republican Party can now slander a candidate throughout the Primary, effectively denying that candidate an equal opportunity to win the nomination, and simultaneously pass a law in the middle of an election cycle which prohibits the slandered person from being on the General election ballot," said Blankenship, who added that he and his attorneys were "evaluating our next steps."

In his reaction statement, Morrisey focused on his Democratic opponent, saying: "No more distractions to hide lying liberal Joe Manchin’s record of supporting pro-abortion policies, gun control, and Hillary Clinton’s campaign against coal miners."

Manchin's campaign had no immediate comment.

Earlier this month, the Gazette-Mail newspaper reported that the West Virginia Secretary of State's Office had processed approximately 4,000 signatures on a petition to let Blankenship on the ballot. Of those, the paper found that 45 percent were Democrats, 24 percent were Republicans and 27 percent were unaffiliated or from minor parties.

At the time, West Virginia Democratic Party Chairwoman Belinda Biafore denied directing any support toward Blankenship.

"Anyone who understands what our party is all about understands that we would never ask anyone to support Don Blankenship to have his name appear on the ballot in the general election," she said through a spokesman.

Blankenship said that most of the signatures were gathered in Democratic areas of the state and show support of a U.S. citizen's right to run for office, not necessarily him as a candidate.

In all, Blankenship's campaign submitted 11,468 signatures.

On Aug. 11, the Gazette-Mail reported that some signatories claimed that they had been falsely told the petition was to keep Blankenship off the ballot, not to let him on the ballot.

Blankenship is the former CEO of Massey Energy, which owned a mine where a 2010 explosion killed 29 workers. He spent a year in federal prison for safety violations related to the explosion.

The Associated Press contributed to this report.