Kash Patel speaks during a campaign rally at Minden-Tahoe Airport on October 8, 2022 in Minden, Nevada.
CNN  — 

A federal judge on Tuesday ordered Donald Trump adviser Kash Patel to testify before a grand jury investigating the handling of federal records at Mar-a-Lago, according to two people familiar with the investigation.

Judge Beryl Howell of the DC District Court has granted Patel immunity from prosecution on any information he provides to the investigation, the people said.

Patel’s grand jury appearance hasn’t yet been scheduled.

The court’s decision is under seal, coming after a confidential proceeding where the Justice Department subpoenaed Patel to the grand jury in October. At that time, he declined to answer questions by asserting his Fifth Amendment protection from self-incrimination.

An attorney for Patel did not respond to CNN’s request for comment. Patel has not been charged with any crime.

The Wall Street Journal first reported on the development.

As CNN has previously reported, Patel is one of a handful of advisers around Trump after his presidency who could have legal risk related to the Mar-a-Lago situation, according to court records and sources, though it’s unclear if he is a target of the Justice Department probe.

He served as a national security and defense official during the Trump administration, and this summer became one of Trump’s designees to interact with the National Archives and the Justice Department as both agencies have tried to repossess classified records Trump kept from his presidency. He has claimed in conservative media interviews he personally witnessed Trump declassifying records before he left the presidency, and has argued Trump should be able to release classified information.

On October 13, Patel spent several hours before the grand jury at the US courthouse in Washington, DC, sources told CNN at the time. When approached then at the courthouse by CNN, one of his attorneys, Stanley Woodward, refused to say what Patel’s matter was about, and only confirmed that he represented the Trump adviser.

Weeks earlier, Patel also received a grand jury subpoena for documents he had of any communications related to the handling of Trump records, sources previously told CNN.

Other witnesses were subpoenaed to the grand jury looking at Mar-a-Lago over the past several months, including in a flurry of activity around the day of the FBI’s August search, one source said.

This story has been updated with additional details Wednesday.

CNN’s Sonnet Swire contributed to this report.