The Biden administration’s effort to establish itself as a committed champion of press freedom is facing new doubts because of the Justice Department’s aggressive legal tactics against a conservative provocateur known for his hidden-camera video stings.

A predawn FBI raid last weekend against Project Veritas founder James O’Keefe and similar raids on some of his associates are prompting alarm from some First Amendment advocates, who contend that prosecutors appear to have run roughshod over Justice Department media policies and a federal law protecting journalists.

Adding to the drama surrounding the brewing court showdown: It stems from a politically sensitive investigation into the alleged theft of the diary of President Joe Biden’s daughter Ashley.

That document made it into the hands of O’Keefe’s organization, Project Veritas, which never published anything on the subject and eventually turned the document over to police.

An ensuing federal investigation resulted in the FBI raid on O’Keefe’s home in Westchester County, N.Y., at 6 a.m. last Saturday to seize his cell phones pursuant to a court order. O’Keefe says he stood handcuffed in his underwear in a hallway as almost a dozen agents — one carrying a battering ram — searched for the phones.

The politically fraught episode is shaping up as an early test of the vows from Biden and Attorney General Merrick Garland to show greater respect for the media and to back away from the confrontational, often hostile approach favored by former President Donald Trump and his administration.

“This is just beyond belief,” said University of Minnesota law professor Jane Kirtley, a former executive director of the Reporters Committee for Freedom of the Press. “I’m not a big fan of Project Veritas, but this is just over the top. I hope they get a serious reprimand from the court because I think this is just wrong.”

O'Keefe’s lawyers complained to a federal judge this week that the raid unfairly denied him the legal protections afforded to journalists.

"The Department of Justice’s use of a search warrant to seize a reporter’s notes and work product violates decades of established Supreme Court precedent," O’Keefe lawyer Paul Calli wrote to prosecutors.

O’Keefe’s lawyers are demanding that the court appoint a special master to supervise the review of the information on his phones, which they contend contains sensitive details about confidential sources, as well as privileged communication with Project Veritas’ attorneys.

Such a process is uncommon, but has been used in recent years to sift through information seized in federal investigations into two of Trump’s personal attorneys, Michael Cohen and Rudy Giuliani.

On Thursday, Manhattan-based U.S. District Court Judge Analisa Torres issued a one-page order giving prosecutors one day to confirm they have "paused [their] extraction and review of the contents" of O’Keefe's cell phones. Torres — an appointee of President Barack Obama — has not yet ruled on O’Keefe’s request for a special master, who is typically a retired judge.

Project Veritas was facing a jury trial in Washington next month in the suit brought by Democracy Partners, a Democratic consulting firm it infiltrated, but on Thursday, a judge postponed the trial due to the raids and the unfolding legal fight over them.

At the center of the gathering legal storm is a pivotal question: Is O’Keefe a journalist in the eyes of the law?

O’Keefe’s attorneys insist that despite his evident political bent and his unorthodox — sometimes deceptive — tactics, he qualifies as a journalist under a federal statute and Justice Department regulations aimed at sharply restricting the use of search warrants and similar steps against members of the media.

Prosecutors insist they’ve complied with those requirements, but have thus far been cagey about whether or not they’re treating O’Keefe as a member of the press.

“The Government hereby confirms that it has complied with all applicable regulations and policies regarding potential members of the news media in the course of this investigation, including with respect to the search warrant at issue,” prosecutors from the U.S. Attorney’s office in Manhattan wrote Monday in a letter to O’Keefe’s lawyers obtained by POLITICO.

At a Senate Judiciary Committee hearing last month, Garland was asked who qualifies as a journalist under Justice Department policies. “It’s very difficult to make that kind of definition,” he said.

O’Keefe is certainly not a typical journalist. Indeed, several of his outfit’s major hidden-camera exposés have been directed at employees of major news organizations such as CNN and NPR, seeking to paint them as left-wing activists. (At least one such attempt was foiled in 2017 when Washington Post reporters suspected they were being set up and effectively turned the tables on O’Keefe’s operatives.)

While many of O’Keefe’s tactics are unsavory, they are far from unknown in the mainstream press. Hidden-camera stings and undercover reporting have fallen out of fashion at most traditional news organizations, but they were once a staple of network television news magazines.

In the 1970s, the Chicago Sun-Times bought a rundown bar and rigged it out with hidden cameras, successfully capturing city inspectors demanding bribes. NBC’s popular and controversial series, “To Catch a Predator,” revolves around hidden-camera stings.

O’Keefe’s rather overt political agenda is also in line with a long American tradition of advocacy journalism. And many conservatives view mainstream news outlets as pervasively liberal in their worldview even as most claim to be neutral in their reporting.

Some of O’Keefe’s practices do seem highly unusual. A poorly redacted pleading filed in the civil suit Project Veritas was set to face trial on next month indicates that O’Keefe encouraged a colleague to tell potential donors they could provide “input” on the timing of release of Project Veritas’ work, raising the specter that O’Keefe was essentially operating under the direct control of political benefactors.

“Real news organizations — whether Fox News, the New York Times or any other recognized media outlet — do not go to their donors, or advertisers, and ask for their ‘input’ on when stories should be run,” attorneys for Democracy Partners said in the court filing.

Kirtley, the Minnesota law professor, warned against denying legal protections to Project Veritas based on its political outlook or its tactics. She also noted that Trump repeatedly accused mainstream media outlets of both unethical practices and of having a political ax to grind.

“Trump’s been saying that about the New York Times for seven years,” she said. “It’s very dangerous to try to categorize people doing journalistic-type work, even if they’re not doing it the way I would do it or the way the mainstream media would do it or the way ethical journalists would do it,” Kirtley said.

Another First Amendment advocate, Trevor Timm of the Freedom of the Press Foundation, also said the raids on Project Veritas were worrying.

“I don't personally like Project Veritas at all, but imagine this was a liberal org under Trump. Not a good precedent,” he wrote on Twitter.

However, legal experts cautioned that even if Project Veritas and O’Keefe qualify as journalists under the law or Justice Department policy, that did not give them license to violate the law.

“If they’ve got evidence that [Project Veritas] has broken the law, then we’re in a completely different world here,” Kirtley said.

Precisely how the Biden daughter’s diary came into the organization’s possession is unclear, but there have been no public indications thus far that — if the diary was stolen — the conservative group planned the theft or helped carry it out.

Court papers provided to the Project Veritas founder when his phones were seized last weekend indicate that his devices were taken as part of an investigation that prosecutors are conducting into potential conspiracy to traffic stolen goods across state lines, as well as accessory-after-the-fact and misprision of a felony.

Precisely what the government told U.S. Magistrate Judge Sarah Cave to get the warrant used to seize O’Keefe’s phones is unclear and remains under seal.

But the bare-bones outline of the investigation contained in the warrant has fueled the concerns of First Amendment advocates because the Supreme Court ruled in 2001 that media outlets cannot be held liable for publishing information that may have been obtained illegally, as long as they themselves obtained the material legally.

Project Veritas’ lawyer, Calli, acknowledged in an interview on Fox News’ “Hannity” last week that O’Keefe’s group “agreed to pay money for the right to publish” the purported Biden diary. Calli said lawyers for the sources assured Project Veritas that the diary had been obtained lawfully, but the group’s only information on how it was obtained came from the sources.

Calli told the court in a letter earlier this week that the sources told Project Veritas they obtained the diary after Ashley Biden abandoned it at a home in Delray Beach, Fla.

Lawyers tracking the case say the publicly available facts suggest two possibilities: the Justice Department deemed O’Keefe did not qualify as a journalist under DOJ guidelines and federal law known as the Privacy Protection Act, or concluded that he was a member of the media, but that Project Veritas’ personnel may still have committed a crime.

Some language in the warrant suggests prosecutors are examining whether a bidding process for the diary violated laws against fencing stolen items.

However, Calli insists that even if the FBI suspects O’Keefe or others of crimes, Justice Department policy required prosecutors to negotiate for Project Veritas’ materials rather than seizing them.

“The principles that informed this guidance are no less applicable where the news-gathering activities focus on the President’s daughter,” Calli wrote in the motion seeking a special master.

Emails obtained by POLITICO show prosecutors declined to tell Calli whether the Project Veritas searches were approved by a Justice Department committee that oversees investigations impacting the news media.

A spokesperson for the U.S. Attorney’s Office in Manhattan declined to comment on the office’s handling of the inquiry. A Justice Department spokesperson also declined comment.

Over the past six months, Biden and Garland have introduced extraordinarily protective policies toward the press, protections so robust that some national security professionals have raised concerns. However, the fight with Project Veritas raises questions about how broadly the new administration intends to apply those robust protections.

“This is really a test in this administration of whether they’re going to put their money where their mouth is,” Kirtley said. “If they’re trying to be seen as great champions of press freedom, this is a pretty bad way to start.”