(Bloomberg) -- Former White House Chief of Staff Mark Meadows was ordered to testify in the Atlanta district attorney’s criminal probe into Donald Trump’s attempts to change the outcome of the 2020 election in Georgia.

The order was issued Wednesday by a state judge in South Carolina, where Meadows lives, according to Jeff DiSantis, a spokesman for Fulton County District Attorney Fani Willis, who is leading the investigation. The ruling by Circuit Court Judge Edward W. Miller in Pickens County, South Carolina, wasn’t immediately available on the court’s public docket.

Fulton County argued in court filings that Meadows is a “necessary and material witness” due to his proximity to Trump and his campaign after he lost the 2020 election to Joe Biden.

Meadows’s lawyer, James W. Bannister, didn’t immediately respond to a message seeking comment. The South Carolina-based lawyer previously argued in court filings that the demand for testimony in Georgia was invalid because Meadows was likely protected by executive privilege.

Meadows made a surprise visit on Dec. 22, 2020, to the Cobb County Civic Center, where he tried unsuccessfully to observe an audit of absentee-ballot signatures that was being conducted by Georgia Secretary of State Brad Raffensperger, Willis said in an August court filing.

Meadows also was present when Trump pressured Raffensperger during a Jan. 2, 2021, call to “find” 11,780 votes -- enough to reverse his loss in the state, Willis said. That call has led to scrutiny over whether language used by Trump about repercussions if his demands weren’t carried constituted potentially illegal threats.

Willis has also been struggling to get testimony from Senator Lindsey Graham, who has asked the US Supreme Court to shield him from answering questions in the probe.

Meadows also refused to sit for an interview by the House committee investigating the attack on the Capitol by a mob of Trump’s supporters, though he initially aided the probe. The committee and entire House voted to hold Meadows in contempt of Congress for his refusal to fully comply with the subpoena, but the Justice Department declined to prosecute him.

Read More: Mark Meadows Testimony Sought in Georgia Trump Election Probe

--With assistance from Billy House.

(Updates with detail on the House committee probing the Jan. 6 attack on the Capitol)

©2022 Bloomberg L.P.