A federal judge ordered the Department of Justice to stop extracting data from the phones of Project Veritas founder James O'Keefe days after his home was raided by the FBI as part of an investigation into the missing diary belonging to President Biden's daughter, Ashley Biden. 

The order, which came on Thursday from District Court Judge Analisa Torres from the Southern District of New York, granted the request from O'Keefe's legal team made Wednesday for an independent "special master" to be appointed to oversee the review of his devices.

PROJECT VERITAS' JAMES O'KEEFE SPEAKS OUT AFTER FBI RAIDED HOME: ‘THIS IS AN ATTACK ON THE FIRST AMENDMENT’

"We are gratified that the Department of Justice has been ordered to stop extracting and reviewing confidential and privileged information obtained in their raids of our reporters, including legal, donor, and confidential source communications," O'Keefe's attorney Harmeet Dhillon told Fox News. "The First Amendment won a temporary victory today, but Project Veritas has a long way to go to hold the DOJ and FBI accountable for their actions."

According to the order, the DOJ must confirm to the court by Friday that it has paused its review of O'Keefe's phones. 

Appearing on "Tucker Carlson Tonight," Dhillon said the federal government seizing any of Project Veritas' donor information, communications with its lawyers as well as sources from within the Biden administration are "multiple First Amendment issues."

"We went to the court and asked the court to order a special master to review this information and not let the Southern District of New York prosecutors and the FBI look at it without somebody separating out this information," Dhillon told Fox News' Tucker Carlson. "The government would not agree to do that voluntarily but we went to court and today a federal judge did order the government to stop looking at these phones. So ultimately, we're going to get some answers as to what was reviewed and what they did with it."

FBI RAIDS HOME OF PROJECT VERITAS' JAMES O'KEEFE AS PART OF INVESTIGATION INTO ASHLEY BIDEN'S ‘STOLEN’ DIARY

"The DOJ has specific regulations about this. There's also a federal statute called the Privacy Protection Act that protects journalists and their information from exactly this type of thuggish behavior that the DOJ has done in this case. And they have blown federal law, they blown the Constitution, they blown due process and civil rights and now they're so easily communicating in some level for sure with the New York Times," Dhillon added. 

Dhillon was alluding to the Times' reporting on the FBI raids of O'Keefe and two Project Veritas associates as well as the publishing of confidential communications between the guerilla news organization and its attorneys. 

Political activist James O'Keefe poses for a photo as he attends the New York screening of the Mike Cernovich film "Hoaxed" in Manhattan in New York City, U.S., December 9, 2018. REUTERS/Andrew Kelly

O'Keefe appeared on "Hannity" for his first interview since the FBI raids took place. 

"I woke up to a pre-dawn raid," O'Keefe told Fox News' Sean Hannity on Monday. "Banging on my door, I went to my door to answer the door and there were ten FBI agents with a battering ram, white blinding lights, they turned me around, handcuffed me and threw me against the hallway. I was partially clothed in front of my neighbors. They confiscated my phone. They raided my apartment. On my phone were many of my reporters' notes. A lot of my sources unrelated to this story and a lot of confidential donor information to our news organization." 

NYT MEDIA COLUMNIST ON FBI RAID OF JAMES O'KEEFE: ‘I DON’T THINK JOURNALISTS SHOULD BE CHEERLEADING THIS ONE'

O'Keefe said he was "in a state of shock" as FBI agents spent over two hours searching his apartment, telling Hannity they took two of his iPhones.  

The FBI did not respond to Fox News' request for comment. 

Democratic presidential nominee and former Vice President Joe Biden's daughter Ashley Biden speaks by video feed during the 4th and final night of the 2020 Democratic National Convention, as participants from across the country are hosted over video links from the originally planned site of the convention in Milwaukee, Wisconsin, U.S. August 20, 2020. 2020 Democratic National Convention/Pool via REUTERS

The investigation, which is also being conducted by the Southern District of New York, surrounds a "stolen" diary belonging to Ashley Biden that went missing just days before the 2020 presidential election.

O'Keefe alleged in a video statement released Friday that "within an hour" of the FBI's raid of the home of a Project Veritas reporter, the Times contacted that reporter for comment. 

JAMES O'KEEFE ADDRESSES FBI RAIDS OF PROJECT VERITAS REPORTERS OVER BIDEN DAUGHTER'S ‘STOLEN’ DIARY

"We do not know how the New York Times was aware of the execution of a search warrant at our reporter's home or the subject matter of the search warrant as a grand jury investigation is secret," O'Keefe said. "The FBI took materials of current, former Project Veritas journalists despite the fact that our legal team previously contacted the Department of Justice and voluntarily conveyed unassailable facts that demonstrate Project Veritas' lack of involvement in criminal activity, and or criminal intent."

"Our efforts were the stuff of responsible ethical journalism, and we are in no doubt that Project Veritas acted properly at each and every step," O'Keefe asserted. 

The Project Veritas founder then explained that "tipsters" approached his group late last year alleging to have Ashley Biden's diary containing "explosive allegations" about her father, then the Democratic nominee, and that the diary was allegedly abandoned in a room that she had stayed at and that they stayed after. 

The "tipsters," who O'Keefe said he had never met prior, were apparently negotiating with media outlets to sell Biden's diary and that ultimately, Project Veritas did not publish the book's contents because his group was not able to independently verify its authenticity. 

CLICK HERE TO GET THE FOX NEWS APP

"Project Veritas gave the diary to law enforcement to ensure it could be returned to its rightful owner. We never published it," O'Keefe said. "Now, Ms. Biden's father's Department of Justice, specifically the United States Attorney's Office for the Southern District of New York, appears to be investigating the situation, claiming the diary was stolen. We don't know if it was but it begs the question: In what world is the alleged theft of a diary investigated by the President's FBI and his Department of Justice? A diary?"

O'Keefe went on to claim the investigation "smacks of politics" but that Project Veritas will "not back down."