Alabama state officials on Thursday officially declared Democrat Doug Jones the winner of its special Senate election, after Republican opponent Roy Moore tried to launch a last-minute effort to contest the outcome.

Less than an hour before, an Alabama judge rejected Moore’s lawsuit attempting to delay certification of the results, saying that the court did not have the jurisdiction to rule in the case.

According to The Associated Press, the suit was filed in Montgomery Circuit Court on Wednesday night, with Moore requesting that the state delay the certification of the election results, launch a fraud investigation and hold a new election.

Jones later filed a motion to dismiss Moore’s lawsuit.

Alabama Secretary of State John Merrill (R) said Thursday morning that he had no plans to delay declaring Jones the winner that afternoon.

“The short answer to that is no,” Merrill told CNN. “Doug Jones will be certified today.”

After state officials certified the election results, Jones said in a statement that he is “looking forward to going to work for the people of Alabama in the new year.”

Moore later issued a defiant statement, again blaming “Democrats” and “the Washington establishment” for his loss, and claiming without evidence that “election fraud experts across the country have agreed that this was a fraudulent election.”

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

Moore lost the Dec. 12 contest to fill Attorney General Jeff Sessions’ vacated Senate seat to Democratic candidate Jones. During the contentious campaign, the former judge faced accusations of sexual harassment and misconduct from multiple women who claimed he preyed on them when they were teenagers and he was in his 30s. Moore, who was twice removed from the Alabama Supreme Court for failure to follow judicial orders, largely disappeared from the campaign trail in the days leading up to the election.

Although the Republican National Committee originally withdrew its formal support of Moore, the party decided to once again fund his campaign after President Donald Trump officially endorsed him.

Still, Moore’s critics urged voters to choose someone else. Just before the election, Sen. Richard Shelby (R-Ala.) announced that he did not vote for Moore.

“I’d rather see the Republican win, but I’d rather see a Republican write-in,” Shelby told CNN’s Jake Tapper about the vote he cast two days before the special election.

Jones, a civil rights advocate and former prosecutor, ultimately won the race by about 20,000 votes. Following the stunning victory, Jones became Alabama’s first Democratic senator in 25 years.

In the complaint filed Wednesday, Moore’s lawyers said they are certain voter fraud occurred, and that the only question is whether there was enough to sway the election. Moore’s lawyers did not elaborate on exactly how they believe fraud occurred.

The complaint repeatedly accuses Merrill of not doing enough to investigate voter fraud, but Merrill said Moore’s campaign had not informed his office of specific allegations to investigate. Merrill said the first he heard about the allegations was late Wednesday evening, shortly before midnight.

“I did read them. We take all allegations very seriously and we investigate all allegations that are introduced to us,” Merrill said in a text message. “There’s also a process for introducing them to us which requires that the complainant complete the form on www.stopvoterfraudnow.com.”

Moore’s complaint cites a viral interview with a man the night of the election who indicated in an off-the-cuff comment that people from all over the country had come to vote and canvass for Jones in Alabama. After tracking down the man in the video and determining he was a registered voter in the state, Merrill declared the case was “nailed shut.” Moore, however, says Merrill should have done more to investigate the claim.

The suit also alleges that large numbers of out-of-state voters came to Alabama and illegally voted in the election. It includes a sworn affidavit from a poll worker saying she had never seen so many people vote with out-of-state driver’s licenses. Alabama law permits people to vote with a state-issued ID from any state.

As a supposed example of voter fraud, the complaint also cited an incident where sample ballots filled out for Jones were on display in a probate judge’s office prior to the election. The ballots were removed after a complaint from Moore, and Merrill said he didn’t believe the incident was a case of voter fraud. Moore also claimed there was Democratic “voter intimidation” in the race, pointing to a super PAC ad that incorrectly told Alabamians their votes would be a matter of public record. Google removed the ad from the internet before the election after Merrill complained.

Moore also took aim at the higher-than-expected turnout in Jefferson County, the state’s most populous, saying it was “inexplicably substantially higher” than places in other parts of the state. Moore implied it was suspicious that turnout in the race far exceeded what was projected. He also pointed to 20 precincts in Jefferson County where he received substantially less of the vote share than the Republican Party.

Read the complaint below:

Roy Moore Complaint by KentFaulk on Scribd

This article has been updated throughout.

Sam Levine contributed reporting.