WASHINGTON — Days before she was fired as acting attorney general, Sally Yates was so troubled that then-National Adviser Michael Flynn misled Vice President Mike Pence about his communications with the Russian ambassador that she warned the White House counsel he was vulnerable to Russian blackmail and could even face criminal charges.

For the first time publicly, Yates recounted before a Senate Judiciary panel the details of a Jan. 26 meeting – and a follow up session the next day – in which she alerted Don McGahn, the White House counsel, that Flynn had lied to administration officials about his conversations with Russian ambassador Sergey Kislyak before Trump's inauguration.

"You don’t want a situation where a national security adviser could get blackmailed by the Russians,’’ Yates told the panel.

Flynn's contacts with the ambassador, according to officials who have previously described the communications, involved discussions with the ambassador about sanctions imposed on Russia by the Obama administration. Those conversations were secretly monitored by federal authorities, as are most communications involving foreign diplomats.

Pence, for his part, had said he had been assured by Flynn that the subject of sanctions was not raised in the Kislyak conversations

Citing the classified nature of how the communications were obtained, Yates declined to elaborate on the intercepts. But she said the anxiety about Flynn's actions was so great within the Justice Department that members of its national security division were consulted, as were other intelligence officials across the government.

"Compromise was the No. 1 concern,'' Yates said, referring to the possibility that Russian officials, aware that Flynn had misled the White House, could blackmail him by threatening his career.

"It was a whole lot more than one White House official lying to another,'' Yates said. "It involved the vice president of the United States."

In their meeting, Yates said McGahn asked her at one point whether Flynn should be immediately dismissed.  Yates said she offered no opinion on Flynn's continuing service, but conveyed the "urgent'' nature of her concerns.

And two days before her first meeting with McGahn, Yates said FBI agents interviewed Flynn about his conversations with Kislyak. After informing McGahn that Flynn had been questioned by the FBI, Yates said McGahn asked: "How did he do?''

​Yates declined to describe Flynn's interview with McGahn because it was then part of an active counter-intelligence investigation.

Eighteen days later, ​after Yates' warnings were made public, Flynn was forced to resign, ending the shortest tenure of any president's national security adviser – while stoking further suspicion about the ties between Trump associates and Russian officials.

By then, Yates was already gone. Just four days Yates' first meeting with the White House counsel, President Trump fired the career federal prosecutor for her actions on a separate matter. A holdover from the Obama administration, Yates had instructed Justice lawyers not to defend Trump's travel ban.

Some Republicans seized on that decision Monday, including Texas Sen. Ted Cruz, suggesting that her actions were partisan. But Yates defended her directive on the travel ban, saying that there were “constitutional concerns’’ about the language of the president's executive order and that she was “not convinced that it was lawful.”

Yates also claimed that Justice’s Office of Legal Counsel, which had previously approved Trump’s order, was specifically instructed not share their deliberations with the interim Justice leadership before the travel ban was made public. She did not detail who instructed the OLC not to share its views with her and other top Justice officials.

The specter of Yates' testimony was not lost on Trump, who early Monday fired off two tweets distancing the administration from Flynn while suggesting that Yates may have leaked information about her actions related to the former national security adviser.

"General Flynn was given the highest security clearance by the Obama Administration - but the Fake News seldom likes talking about that,'' Trump said. "Ask Sally Yates, under oath, if she knows how classified information got into the newspapers soon after she explained it to W.H. Council (sic).''

Trump and Obama administration officials also confirmed Monday that Obama advised Trump not to hire Flynn during their post-election White House meeting. For the past several days, in fact, Flynn and former Trump advisers, including Carter Page, Paul Manafort and Roger Stone have become the subjects of fresh scrutiny about their Russian ties.

Separately, the Senate Intelligence Committee, which along with the House Intelligence Committee are conducting a parallel inquiries into Russian interference in the 2016 elections, recently asked the advisers to provide information about their activities.

Flynn also is now under investigation by the Pentagon Inspector General for failing to inform Defense Department officials about seeking payments from foreign governments.

Former Director of National Intelligence James Clapper also appeared at Monday's Senate hearing with Yates, but the bulk of the questioning was directed at Yates, who was accompanied to the hearing by family members.

Sen. Lindsey Graham, R-S.C., who led Monday's Senate subcommittee hearing, said the panel's examination is necessary to "hold [Russia] accountable.''

"Based on evidence presented by our intelligence and law enforcement communities, I believe Russia interfered in our election,'' Graham has said. "I do not believe it changed the outcome, but I have no doubt they interfered.'' The U.S. intelligence community has accused Moscow of orchestrating a campaign of cyberattacks to hack Democratic political organizations and release stolen information to undermine confidence in the American election.

Yates repeatedly declined to provide detailed information about the Justice Department's scrutiny of Flynn, citing the classified nature of the review. But the details she did provide --- her discussion with McGahn about Flynn's possible exposure to criminal charges and blackmail--had committee members often leaning forward in their chairs.

"My purpose in telling them (the White House) was so they could act,'' Yates said.

Yates' own journey to the witness chair has been long and politically fraught.

In March, when Yates' attorney had notified the Justice Department and White House of her intent to appear at a previously scheduled House Intelligence Committee hearing, the attorney was warned that Yates' testimony could contained privileged communications that might be barred.

Ultimately, Yates' scheduled March 28 appearance was canceled.

Trump spokesman Sean Spicer has since indicated that the White House had no objection to Yates' testifying.

Flynn, meanwhile, has sought immunity from any possible prosecution. Both the House and Senate Intelligence committees, in the midst of continuing Russia probes, have indicated that it is too early in their investigations to cut a deal for Flynn's testimony. Separately, preliminary discussions about Flynn's prospects for immunity in the FBI investigation also have yielded no agreement.

Flynn's attorney, Robert Kelner, declined to comment Monday.