A federal judge said Tuesday the court had received a copy of the immunity deal struck between the Justice Department and Hillary Clinton's former information technology aide, but ordered the agreement to remain under seal in the face of a "criminal investigation."

Bryan Pagliano, the former IT staffer who set up and maintained Clinton's private server network, has told the court he plans to invoke his Fifth Amendment rights and refuse to answer questions about the email controversy during an upcoming deposition in a Freedom of Information Act lawsuit.

Judge Emmet Sullivan of U.S. District Court denied a request from Pagliano's legal team to prevent Judicial Watch, the conservative watchdog group who brought the suit, from filming the deposition. However, Sullivan ordered the nonprofit to keep the tape under wraps.

"[T]he need for public access to Mr. Pagliano's agreement with the government is minimal," Sullivan wrote in an order filed Tuesday.

"Mr. Pagliano's immunity agreement has not previously been disclosed. Mr. Pagliano and the government object to disclosure of the immunity agreement," the judge continued. "Indeed, the privacy interests at stake are high because the government's criminal investigation through which Mr. Pagliano received limited immunity is ongoing and confidential."

Sullivan said Pagliano's team had filed a copy of the immunity deal "solely to enable the court to assess the legitimacy of his intent to assert his Fifth Amendment rights in this civil proceeding."

Pagliano had been slated to testify earlier this month, but his attorney's push to prevent the video recording of the deposition has stalled the transcribed session to a later date.