MONTGOMERY, Ala. — Democrat Doug Jones’ historic victory over Republican Roy Moore was declared official Thursday as Alabama election officials certified him the winner of the special Senate election earlier this month, despite claims of voter irregularities from his opponent.

Alabama Gov. Kay Ivey, Attorney General Steve Marshall and Secretary of State John Merrill — all Republicans — signed off on the Dec. 12 election results from all 67 counties and after late-counted provisional and military ballots were added to the total.

Jones defeated Moore by 21,924 votes in a stunning victory in a deeply red state. It was the first Democratic Senate victory in a quarter-century in Alabama.

Moore had attempted to stop the vote from being counted. Late Wednesday, the former state judge filed a legal complaint alleging “election fraud,” and asked the state to consider holding a new election.

But shortly before the official certification Thursday, Montgomery Circuit Judge Johnny Hardwick denied Moore’s request to stop the process.

In the complaint, filed in state court, Moore’s campaign argued that Alabama would “suffer irreparable harm if the election results are certified ... without preserving and investigating all the evidence of potential fraud.”

Moore’s campaign cited rumors of election fraud that had already been investigated and rejected by Merrill, argued that high Democratic turnout in key areas was statistically unlikely, and reported that Moore himself had taken a polygraph test — an attempt to disprove allegations that he made unwanted sexual advances toward teenagers when he was in his 30s.

“This is not a Republican or Democrat issue as election integrity should matter to everyone,” Moore said Wednesday.

The complaint also recounted how Merrill investigated a viral video of a man saying people had come from “across the country” to help beat Moore — but goes on to argue that the investigation was not transparent.

The man in the video turned out to be a legal Alabama voter.

“That was all fictitious,” Merrill said of the voter fraud complaint after certifying the election. “It was made up; it was just a lie that started on the internet.”

While Moore dramatically underperformed other Republican candidates in Alabama when he last ran for office, in 2012, the campaign cites four “experts” to argue that the state should “order a new special election to be held based upon the already known fraud which Secretary Merrill had acknowledged and taken action against and the further fraud alleged in this Complaint.”

Moore’s experts came to the case with baggage of their own.

James Condit Jr., one of the election analysts who signed an affidavit on behalf of Moore’s campaign, has written and spoken about “Zionist” control of world politics, and alleged a Jewish role in the Sept. 11, 2001, terrorist attacks.

“The terror attacks of 9/11 were done by, in effect, Israeli agents,” Condit said in a 2016 radio broadcast. “These Israeli/Zionist/Jewish agents that are in on this crime syndicate — they did 9/11, covered it up with their five TV networks, which are run by the same crowd.”

Richard Charnin, who provided the court with an argument that there was just enough possible fraud to swing the election, claimed to have “mathematically” proved a conspiracy behind the assassination of John F. Kennedy.

A spokesman for Jones called Moore’s lawsuit a “desperate attempt to subvert the will of the people.”

“The election is over. It’s time to move on,” Sam Coleman wrote in an email.

Jones will be sworn in Jan. 3, narrowing the GOP’s advantage in the U.S. Senate to 51-49. He takes over the seat previously held by Attorney General Jeff Sessions.

Jones is a former U.S. attorney best known for prosecuting two Ku Klux Klansmen responsible for Birmingham’s infamous 1963 church bombing.

Merrill said he had not found any evidence of voter fraud, but that his office will investigate any complaint Moore submits.

Rick Hasen, an election law expert and professor at the University of California, Irvine, said Moore’s complaint did not raise the sort of issues that lead courts to overturn an election.

Moore has sent several fundraising emails to supporters asking for donations to investigate claims of voter fraud.

After the election was certified, Jones said in a statement that he looks forward “to going to work for the people of Alabama in the new year.”

Moore said in a statement that “this was a fraudulent election,” making no reference to Jones’ victory.

“I have stood for the truth about God and the Constitution for the people of Alabama,” said Moore. “I have no regrets. To God be the glory.”

Washington Post contributed.