WASHINGTON — Just days into his new position as President Trump’s national security adviser, Michael T. Flynn found himself in a meeting that any White House official would dread. Face to face with F.B.I. agents, he was grilled about a phone call he had had with Russia’s ambassador.

What exactly Mr. Flynn said has not been disclosed, but current and former government officials said on Tuesday that investigators had come away believing that he was not entirely forthcoming. Soon after, the acting attorney general decided to notify the White House, setting in motion a chain of events that cost Mr. Flynn his job and thrust Mr. Trump’s fledgling administration into a fresh crisis.

Mr. Flynn’s rise and fall followed familiar patterns in Washington, where ambitious figures secure positions of great authority only to lose them in a blizzard of contradictions, recriminations and scandal. But rarely has an official at such a high level risen and fallen in such a dizzyingly short time, in this case just 24 days after Mr. Flynn arrived in the West Wing to take his corner office.

Given his short stay at the top, Mr. Flynn’s case might be quickly forgotten as an isolated episode if it did not raise other questions, particularly about what the president knew and when. Even more broadly, it underscores lingering uncertainty about the relationship between the Trump administration and Vladimir V. Putin’s Russia, a subject of great interest given American intelligence reports of Moscow’s intervention in last year’s elections in the United States.

As leaders of both parties said on Tuesday that they expected the Senate to investigate and probably even summon Mr. Flynn to testify, more details emerged about a drama that played out largely in secret inside a White House riven by competing power centers. Sean Spicer, the White House press secretary, revealed that Mr. Trump had known about concerns that Mr. Flynn lied for more than two weeks before demanding his resignation on Monday night. But Vice President Mike Pence was kept in the dark and did not learn that Mr. Flynn had misled him about his Russia contacts until reading news accounts late last week.

Image

Michael T. Flynn, right, stepped down as national security adviser on Monday night after President Trump demanded his resignation. He held the job for 24 days.CreditKevin Hagen for The New York Times

Mr. Spicer described a deliberative process in which a new president took his time deciding what to do with Mr. Flynn, a retired three-star general who played a major role in his campaign. The issue, Mr. Spicer said, was not about legality but credibility.

“The evolving and eroding level of trust as a result of this situation and a series of other questionable instances is what led the president to ask for General Flynn’s resignation,” he said.

But other aides privately said that Mr. Trump, while annoyed at Mr. Flynn, might not have pushed him out had the situation not attracted such attention from the news media. Instead, according to three people close to Mr. Trump, the president made the decision to cast aside Mr. Flynn in a flash, the catalyst being a news alert of a coming article about the matter.

“Yeah, it’s time,” Mr. Trump told one of his advisers.

Until around that point, Mr. Flynn seemed to think he was going to keep his job. He told The Daily Caller, a conservative news site, on Monday that he had not violated the law. “If I did, believe me, the F.B.I. would be down my throat, my clearances would be pulled,” he said. “There were no lines crossed.”

But by that evening, he was writing a resignation letter, admitting no deception, only that he had “inadvertently” passed along “incomplete information.”

The issue traced back to a call last December between Mr. Flynn, then on tap to become Mr. Trump’s national security adviser, and Sergey I. Kislyak, the Russian ambassador to the United States. President Barack Obama was imposing new sanctions on Russia and expelling 35 diplomats after the election meddling.

The day after the sanctions were announced, Mr. Putin said Russia would not retaliate in kind, as has been the custom in the long, tortured history of Russian-American relations, instead waiting for a new administration that he assumed would be friendlier.

Inside the Obama administration, officials were stunned. Mr. Trump publicly welcomed the decision. “Great move on delay (by V. Putin),” he wrote on Twitter. “I always knew he was very smart!”

Around the same time, Obama advisers heard separately from the F.B.I. about Mr. Flynn’s conversation with Mr. Kislyak, whose calls were routinely monitored by American intelligence agencies that track Russian diplomats. The Obama advisers grew suspicious that perhaps there had been a secret deal between the incoming team and Moscow, which could violate the rarely enforced, two-century-old Logan Act barring private citizens from negotiating with foreign powers in disputes with the United States.

The Obama officials asked the F.B.I. if a quid pro quo had been discussed on the call, and the answer came back no, according to one of the officials, who like others asked not to be named discussing delicate communications. The topic of sanctions came up, they were told, but there was no deal.

Video

The events that led to Flynn’s resignation as national security adviser in February 2017 stretch back to before President Trump’s inauguration.CreditCreditKevin D. Liles for The New York Times

On Jan. 12, David Ignatius, a columnist for The Washington Post, reported that Mr. Flynn had called Mr. Kislyak, setting off news media interest in what was said. Mr. Spicer, then the spokesman for Mr. Trump’s transition team, went to Mr. Flynn, who he said told him that sanctions had not come up during the call. Briefing reporters the next day, Mr. Spicer repeated the misinformation, saying that the conversation had “never touched on the sanctions.”

Mr. Flynn told the same thing to Mr. Pence and Reince Priebus, the incoming White House chief of staff, who were scheduled to go on the Sunday talk shows and expected that they would be asked about the matter, according to the two men. On Jan. 15, Mr. Pence went on “Face the Nation” on CBS and on “Fox News Sunday” and repeated that sanctions had not been discussed, while Mr. Priebus said much the same on “Meet the Press” on NBC.

The topic came up again after Mr. Trump and his team moved into the White House. At his first full briefing on Jan. 23, Mr. Spicer said that Mr. Flynn’s conversation had touched on only four subjects, none of them sanctions. That caught the attention of the F.B.I. and the Justice Department.

Sally Q. Yates, an Obama appointee held over as acting attorney general until Mr. Trump’s choice was confirmed, concluded that the disparity between what was said on the call and what Mr. Flynn had evidently told the vice president and others about it might make the new national security adviser vulnerable to blackmail. When foreign governments hold information that could prove embarrassing, it is considered a potential leverage point.

Soon after the Jan. 23 briefing, James B. Comey, the F.B.I. director, sent agents to interview Mr. Flynn. If he told the agents what he said publicly for more than a week after that interview — that his conversations with the ambassador had been innocuous and did not involve sanctions — then he could face legal trouble. If the authorities concluded that he knowingly lied to the F.B.I., it could expose him to a felony charge.

It was not clear whether Mr. Flynn had a lawyer for his interview or whether anyone at the White House knew the interview was happening. But they knew afterward because Ms. Yates, with the support of Mr. Comey, reached out to Donald F. McGahn II, the new White House counsel, on Jan. 26 to give him what Mr. Spicer called a “heads up” about the discrepancy.

Mr. Trump was told “immediately,” Mr. Spicer said, and directed Mr. McGahn to look into the matter. After an “extensive review” that lasted several days, Mr. McGahn concluded that nothing in the conversation had violated federal law, Mr. Spicer said.

But the president then set out to determine whether he could still trust Mr. Flynn. Mr. Spicer said Mr. Flynn stuck to his original account, making matters worse.

“We got to a point not based on a legal issue, but based on a trust issue, with the level of trust between the president and General Flynn had eroded to the point where he felt he had to make a change,” Mr. Spicer said. “The president was very concerned that General Flynn had misled the vice president and others.”

Asked if Mr. Trump had instructed Mr. Flynn to talk about sanctions with Mr. Kislyak, Mr. Spicer said, “No, absolutely not.” Asked if Mr. Trump knew that the issue had come up before the Justice Department told the White House, Mr. Spicer said, “No, he was not aware.”

Image

Vice President Mike Pence, left, learned that Mr. Flynn had misled him about a call to the Russian ambassador after reading news media reports last week.CreditGabriella Demczuk for The New York Times

Mr. Spicer emphasized that there was “nothing wrong” with Mr. Flynn’s talking with representatives of other countries to prepare for the new president taking office, and that, in fact, Mr. Trump wanted him to.

By that point, Mr. Trump’s relationship with Mr. Flynn had grown more awkward. One person close to the president, who asked to remain anonymous to describe private discussions, said Mr. Trump had been “uncomfortable” with Mr. Flynn for weeks. Jared Kushner, the president’s son-in-law and senior adviser, had expressed concern about Mr. Flynn’s appointment even before the inauguration, according to another person briefed on the discussions.

Mr. Trump’s views were coming around to the same point. “What he knew was that Flynn was too much about Flynn, versus Mattis,” the person close to the president said. Defense Secretary Jim Mattis was seen as deferential to the chain of command. “He loves Mattis because Mattis is respectful and self-confident.”

Another key figure with growing concerns about Mr. Flynn was Stephen K. Bannon, the president’s chief strategist whom Mr. Flynn perceived as a rival for control over national security. Mr. Trump began asking Mr. Mattis about two weeks ago for suggestions of possible replacements for Mr. Flynn. The defense secretary recommended retired Vice Adm. Robert S. Harward. Mr. Bannon reached out to Mr. Harward last week, two senior officials said.

The situation escalated late Thursday when word reached the White House that The Washington Post was reporting that the transcript of Mr. Flynn’s call showed that he had discussed sanctions, contrary to his assurances to Mr. Pence and others.

White House officials confronted Mr. Flynn, who only then said that it was possible they had come up, but that he did not remember. “His story remained the same until that night,” Mr. Spicer said. “That’s when his response changed.”

That was also when Mr. Pence first learned that the Justice Department had proof that Mr. Flynn had not told the truth and had warned the White House two weeks earlier, according to Marc Lotter, his spokesman. “He did an inquiry based on those media accounts,” Mr. Lotter added, without elaborating.

Another person who speaks frequently with him said Mr. Pence went “ballistic,” or at least what qualifies as ballistic for the coolheaded vice president.

Mr. Pence, Mr. Priebus and Mr. Bannon urged Mr. Trump to fire the national security adviser, according to officials, but the president could not bring himself to do it, in part for fear of losing face. When a reporter on Air Force One heading to Florida on Friday asked him about The Post’s report, Mr. Trump said he had not read it. “I don’t know about that,” he said. “I haven’t seen it.”

As late as Monday, he was sticking by Mr. Flynn. He sent his counselor, Kellyanne Conway, to tell a television interviewer that he had “full confidence” in Mr. Flynn. And Mr. Flynn phoned a reporter for The Daily Caller on Monday to say the president had “expressed confidence” in him and urged him to “go out and talk more.”

In that interview, posted on Tuesday, Mr. Flynn said he had discussed the Russian diplomats’ expulsion with Mr. Kislyak. “It wasn’t about sanctions,” he said. “It was about the 35 guys who were thrown out.” Mr. Flynn added: “It was basically, ‘Look, I know this happened. We’ll review everything.’ I never said anything such as, ‘We’re going to review sanctions,’ or anything like that.”

Either way, it was too late. When the matter came to overshadow the president’s glitch-free meeting with Prime Minister Justin Trudeau of Canada and word arrived of another Post article on Ms. Yates’s warning to the White House, Mr. Trump ordered an end to the situation. “He made a determination late in the day,” Mr. Spicer said, “and he executed on it.”