A judge on Wednesday ordered former House Speaker Newt Gingrich to testify before a special grand jury in Atlanta that's investigating whether then-President Donald Trump and others illegally tried to influence the 2020 election in Georgia.

Gingrich, who lives in northern Virginia, had argued that the federal law that normally requires states to honor out-of-state grand jury summonses should not apply in this case because the special grand jury lacks the power to indict. He also argued that the subpoena would be unnecessarily duplicative and burdensome because he has already agreed to testify in front of a congressional select committee investigating the deadly Jan. 6 attack on the Capitol and that his testimony in both matters would essentially be the same.

But Fairfax County Circuit Court Judge Robert Smith sided with prosecutors who said the subpoena should be enforced. The judge said the law doesn't parse out a difference between regular grand juries and special grand juries, as Gingrich's lawyer argued.

"I think I have to read the statute as written," the judge said.

Gingrich's lawyer, John Burlingame, said he expects to appeal the ruling. If the appeal fails, Gingrich will be required to testify to the special grand jury on Nov. 29.

Gingrich, a Republican, is one of several high-profile Trump allies who have unsuccessfully tried to avoid testifying.

Fulton County District Attorney Fani Willis opened the investigation early last year, shortly after a recording of a call between Trump and Georgia Secretary of State Brad Raffensperger was made public. In that call, Trump urged Raffersperger, the state's top elections official and a fellow Republican, to "find" the votes needed to overturn his narrow loss in the state to Democrat Joe Biden.

The scope of the investigation has broadened considerably since then, and Willis, a Democrat, has sought the testimony of dozens of witnesses, including numerous Trump attorneys, advisers and associates since the special grand jury was seated in May. It is among several cases that have the former president in potential legal jeopardy as he prepares to launch a 2024 presidential campaign.

Because Gingrich lives outside Georgia, Willis had to use a process that involves asking a judge where he lives to order him to appear.

Willis filed that paperwork in court in Atlanta last month, and Fulton County Superior Court Judge Robert McBurney, who's overseeing the special grand jury, certified that Gingrich is a "necessary and material witness for the investigation." In her petition seeking Gingrich's testimony as a witness, Willis said she relied on information made public by the House committee that's investigating the Jan. 6 attack.

The petition says Gingrich was involved along with others associated with the Trump campaign in a plan to run television ads that "repeated and relied upon false claims about fraud in the 2020 election" and encouraged members of the public to contact state officials to push them to challenge and overturn the election results based on those false claims.

Gingrich was also involved in a plan to have Republican fake electors sign certificates falsely stating that Trump had won the state and that they were the state's official electors even though Biden had won, the petition says.

Special grand juries in Georgia are generally used to investigate complex cases with many witnesses. They can compel evidence and subpoena testimony from witnesses, but they cannot issue indictments. Once its investigation is complete, a special grand jury can recommend action, but it remains up to the district attorney to decide whether to then seek an indictment from a regular grand jury.