Defense Secretary Lloyd J. Austin III was initially briefed on the leak on the morning of April 6. Pentagon officials tried to get some of the Telegram and Twitter posts showing pictures of some of the documents that initially came to light deleted, but they were unsuccessful.

The next day, last Friday, Mr. Austin began convening departmentwide meetings to address the growing disclosures. Pentagon and other U.S. officials began contacting congressional leaders and allies to alert them to the leaks, which have ignited political firestorms in some countries.

Also last Friday, the military’s Joint Staff, which had produced many of the briefing slides that were leaked, instituted procedures to limit the distribution of highly sensitive briefing documents and restrict attendance at meetings where briefing books containing paper copies of the documents were available.

On Tuesday, in his first public comments about the leaks, Mr. Austin struggled to explain why the Defense Department only learned about the leaks long after they first surfaced on Discord.

“Well, they were somewhere in the web,” Mr. Austin said of the leaked documents. “And where exactly and who had access at that point, we don’t know. We simply don’t know at this point.”

Even as Mr. Austin spoke, news outlets began writing about discoveries of more documents.

On Thursday morning, Mr. Austin called a meeting with senior staff members to discuss the crisis.

But by then the F.B.I. was already preparing the search warrant for the home in North Dighton, and investigators began assuring Pentagon officials that the leaker would soon be caught.

Reporting and research were contributed by Riley Mellen, Adam Goldman, Michael Schwirtz, Helene Cooper, Eric Schmitt, John Ismay, C.J. Chivers, Michael D. Shear, Kitty Bennett and Sheelagh McNeill.