WASHINGTON — Less than a week into the Trump administration, Sally Q. Yates, the acting attorney general, hurried to the White House with an urgent concern. The president’s national security adviser, she said, had lied to the vice president about his Russian contacts and was vulnerable to blackmail by Moscow.

“We wanted to tell the White House as quickly as possible,” Ms. Yates told a Senate Judiciary subcommittee on Monday. “To state the obvious: You don’t want your national security adviser compromised with the Russians.”

But President Trump did not immediately fire the adviser, Michael T. Flynn, over the apparent lie or the susceptibility to blackmail. Instead, Mr. Flynn remained in office for 18 more days. Only after the news of his false statements broke publicly did he lose his job on Feb. 13.

Ms. Yates’s testimony, along with a separate revelation Monday that President Barack Obama had warned Mr. Trump not to hire Mr. Flynn, offered a more complete public account of Mr. Flynn’s stunning fall from one of the nation’s most important security posts.