National-security experts and legal experts were "gobsmacked" by senior White House officials' attendance Thursday at a classified briefing about the Russia investigation and reports that an FBI informant had talked to the Trump campaign.

The White House chief of staff, the White House counsel, three GOP lawmakers, and one Democrat met with Deputy Attorney General Rod Rosenstein, FBI Director Christopher Wray, and Director of National Intelligence Dan Coats to glean more details about the informant and other details of the Russia investigation.

One former FBI official described the situation — and President Donald Trump's and his allies' broadsides against the DOJ — as a "f---ing circus."

Sign up for the latest Russia investigation updates here »

The president's chief of staff and the White House counsel attended a classified briefing Thursday with top Justice Department officials and lawmakers about an investigation into the president and his associates — and the events have floored national-security experts and former intelligence officials.

When the White House announced the first of the two briefings earlier this week, it said John Kelly, the chief of staff, would not be attending.

One former FBI official said they were "gobsmacked" when they learned the chief of staff would be present after all.

"This is an investigation centering squarely around the president and his cohorts," said this person, who requested anonymity to speak candidly. "And we've got the president's chief of staff attending a classified briefing — and getting sensitive intelligence — about said investigation. It's a f---ing circus."

When it emerged later that Emmet Flood, the new White House counsel, also attended the briefing, the person added: "This is truly mind-boggling."

Renato Mariotti, a former federal prosecutor in Chicago, expressed a similar view.

"It is completely inappropriate for a lawyer representing a subject of the investigation to attend the congressional oversight meeting in which nonpublic information about the investigation was revealed," he tweeted following the first briefing. "What possible legitimate purpose could his attendance have served?"

The White House said in a statement following the briefings that Kelly and Flood did not attend the meetings but "did make brief remarks before the meetings started to relay the President's desire for as much openness as possible under the law."

John Kelly, the White House chief of staff, attended the first classified briefing on Thursday. Associated Press/Andrew Harnik

The first briefing Thursday included Kelly, Flood, Deputy Attorney General Rod Rosenstein, FBI Director Christopher Wray, Director of National Intelligence Dan Coats, House Intelligence Committee Chairman Devin Nunes and ranking member Adam Schiff, House Oversight Committee Chairman Trey Gowdy, and House Speaker Paul Ryan.

Schiff was invited at the last minute after Democrats slammed Nunes and Gowdy for what they described as a partisan briefing that could be weaponized against the Justice Department and Robert Mueller, the special counsel investigating Russia's interference in the 2016 election and whether members of the Trump campaign colluded with Moscow or attempted to obstruct justice.

The second briefing included Kelly, Rosenstein, Wray, Coats, Nunes, Schiff, and most other members of the so-called Gang of Eight, a bipartisan group consisting of the Republican and Democratic leaders of the intelligence committees and the majority and minority leaders of the House and Senate. Ryan said he would not be able to attend, citing scheduling conflicts.

Tensions between the White House and the DOJ are at a boiling point — and at the eye of the storm are the Russia investigation, Mueller, and an FBI informant said to have talked with members of Trump's team during the 2016 campaign.

The informant was not named in initial news reports, but several media outlets later identified the person as Stefan Halper, a veteran of previous Republican administrations and a former professor emeritus at Cambridge University who was in touch with several members of the Trump campaign.

Reports about the informant last week sparked a flurry of unproven accusations from Trump and his loyalists that the FBI was spying on the Trump campaign. The president subsequently requested that the DOJ investigate the matter.

The DOJ agreed to Thursday's briefings, both of which included details about the informant and the Russia investigation, after a back-and-forth with congressional Republicans and the White House over protecting the person's safety.

White House accused of playing politics

Security works at the Department of Justice as the building is reflected in the hood of a car, Thursday, May 24, 2018, ahead of a group meeting about the Trump Russia probe in Washington. Among the people expected to meet at the request of President Donald Trump are House Permanent Select Committee on Intelligence Chairman Devin Nunes, House Committee on Oversight and Government Reform Chairman Trey Gowdy, FBI Director Christopher Wray, Director of National Intelligence Dan Coats, Principal Deputy Assistant Attorney General for the National Security Division Ed O'Callaghan, and White House Chief of Staff John Kelly. AP Photo/Jacquelyn Martin

Citing a person familiar with the matter, CNN reported Wednesday that Trump told Kelly he wanted Thursday's briefings to appear nonpartisan, as well as to ensure that Democrats were able to view the classified intelligence so the White House would not look as though it were playing politics.

Trump was reportedly annoyed when it emerged that Democrats were initially barred from the first briefing, because he did not want the revelation to overshadow what he believes to be the bigger picture: a conspiracy against him and his administration by the top ranks of the DOJ and the FBI.

Meanwhile, Kelly's and Flood's attendance most likely further complicated the optics.

Robert Deitz, a former general counsel at the National Security Agency and senior counsel at the CIA, said he was "astonished" that Democrats were initially shut out of the first briefing and that Kelly and Flood were present as White House officials.

"It's almost like Kelly's there as a minder," Deitz said. "This is always the tricky part of investigating the president of the United States — the investigators are working under the guy being investigated."

Kelly's and Flood's presence there "is certainly not helpful, particularly in a case like this," he said.

The chief of staff's and White House counsel's attendance did not go unnoticed by Democratic lawmakers on the House Intelligence Committee.

One member, Rep. Mike Quigley, slammed Nunes' broadsides against the DOJ and said Kelly's and Flood's presence only assisted the chairman's "underlying mission: to protect the president's political reputation at all costs."

"The partisan probe into our law-enforcement agencies is a farce, and all of those in Trump's inner circle are on board," Quigley added.

The danger of leaks

Meanwhile, national-security experts sounded the alarm over what they characterized as the "troublesome" identification of the informant and details about the person that were likely shared in Thursday's briefings.

"This puts the intelligence community and the DOJ in a bind, no question about it," Deitz said. "The fact that Halper's name has been released or leaked is a problem."

He added that while the US's reputation made it unlikely for allies to sever ties completely, "it certainly may make foreign allies in some circumstances hesitant to reveal the crown jewels."

The former FBI official echoed that view, highlighting the obstacles that could arise in the US's intelligence-gathering process with its partners.

"Trust is the single most important factor in the intelligence community," they said. "Human intelligence sources are the FBI's greatest asset, especially when it comes to assessing foreign threats. How many people are going to want to do that work if there's a risk, aggravated by the White House, that their name will be leaked and their life threatened if the president is unhappy?"