WASHINGTON — After six months of work, special counsel Robert Mueller III has indicted two top advisers to President Trump and accepted guilty pleas from two others in exchange for their cooperation with his probe into Russian meddling in the 2016 election – a sign of mounting legal peril for the White House.

With the guilty plea Friday by former national security adviser Michael Flynn – one of Trump’s closest and most valued aides – the investigation has swept up an array of figures with intimate knowledge of the campaign, the transition and the White House.

It appears to have swiftly expanded beyond Russia’s interference in the campaign to encompass a range of activities, including contacts with Russian officials during the transition and alleged money laundering that took place long before Trump ran for office.

And Flynn’s agreement to fully cooperate with investigators suggests that Mueller is not done yet.

Both Flynn and George Papadopoulos, who served as a foreign policy adviser to Trump’s campaign, acknowledged lying to the FBI about their contacts with the Russians. Now, both are cooperating with Mueller, according to prosecutors, potentially providing evidence against other Trump aides.

“Mueller has proceeded with professionalism, deliberation and without delay to build a case with a wall of substance,” said Richard Ben-Veniste, who was a lead member of the Watergate special prosecution team. “This plea today is another brick in that wall.”

Along with Flynn and Papadopoulos, former Trump campaign chairman Paul Manafort and his deputy, Rick Gates, have been charged with money laundering and other crimes related to political consulting they did in Ukraine prior to joining Trump’s effort. They pleaded not guilty.

On Friday, the news about Flynn’s deal broke after the regular senior staff meeting at the White House, startling top officials and leaving many feeling helpless.

“We don’t know really what is going on,” according to one adviser who speaks to Trump often and requested anonymity to describe private conversations. “Who’s it going to implicate? What are they going to say?”

Flynn’s cooperation poses particular risks for the White House.

Unlike Papadopoulos, who had minimal contact with top aides and met Trump just once, Flynn was a key member of Trump’s inner circle, considered at one point for the vice-presidential nomination.

There have been signs for months that Trump was particularly nervous about the possibility of the investigation ensnaring his former national security adviser.

Former FBI director James Comey testified in June that Trump urged him in February to back off an investigation of Flynn. Their one-on-one conversation in the Oval Office came three weeks after Flynn was interviewed by FBI agents and lied about his foreign contacts.

If anyone on the campaign coordinated with the Russians in their efforts to interfere with the election, Flynn probably would have been aware.

Court documents filed Friday show that Flynn did not operate independently in his contacts during the transition with Russian Ambassador Sergey Kislyak – which he then lied about to federal agents.

According to the filings, Flynn consulted with multiple senior Trump officials during the transition. One adviser, described in court documents as a “very senior member” of the transition team, directed Flynn in December to reach out to Kislyak and lobby him about a United Nations resolution on Israeli settlements.

People familiar with the investigation identified the adviser as Trump’s son-in-law, Jared Kushner. Kushner lawyer Abbe Lowell declined to comment.