As he meticulously planned the Las Vegas attack, the man responsible for the worst mass shooting in modern American history took elaborate steps to stymie the inevitable law enforcement investigation, according to federal court documents unsealed.

The FBI search warrants shed new light on the degree to which the gunman, Stephen Paddock, who killed 58 people and wounded more than 500 others when he opened fire on a crowd from a hotel room in October, planned the attack and prepared for the aftermath. One of the warrants described how Mr Paddock “destroyed or tried to hide digital media devices.”

Investigators said he used anonymous communications devices, including a prepaid cellphone, to cover his tracks and employed a “level of sophistication which is commonly found in mass casualty events.”

“Paddock planned the attack meticulously and took many methodical steps to avoid detection of his plot and to thwart the eventual law enforcement investigation that would follow,” the FBI said.

Mr Paddock’s motive for the attack remains unknown.

The search warrants, which were approved by judges shortly after the shooting, said three cellphones belonging to Mr Paddock were found in his room at the Mandalay Bay Resort and Casino, including two that investigators searched and one that they could not unlock. An FBI agent wrote that he believed “if there were any information related to a potential conspiracy, it would be found within” the locked phone, which used a Google operating system.

The search warrants detail how law enforcement focused on Marilou Danley, the girlfriend of Mr Paddock. She has not been charged with a crime and has spoken to investigators several times, and her lawyer has said she was not aware of Mr Paddock’s deadly plans. The investigation is continuing, and the warrants only reflect its early stages.

“She has been identified thus far as the most likely person who aided or abetted Stephen Paddock based on her informing law enforcement that her fingerprints would likely be found on the ammunition used during the attack,” according to one of the documents.

She told investigators she occasionally helped Mr Paddock load magazines. The FBI said there was no evidence that she knew of his plans or had been deceptive, but it cautioned soon after the shootings that she was still the “subject of intensive review.”

Ms. Danley corroborated much of what had been previously pieced together by investigators, but she has been adamant that she had no prior knowledge of Mr Paddock’s intention to carry out the mass shooting.

According to the documents, it appears that Mr Paddock relied on the internet to buy many of the items used in the attack, including guns and ammunition, during the 12 months leading up to it.

He spent “significant time and expense prior to the attack purchasing and caching weapons” and other items, such as glass cutters and suitcases. The authorities have said he used the glass cutters so he could fire out of his hotel window at the people below, who were attending a country music concert.

Much of what investigators found in the hotel room had already been made public, but the search warrants add additional details. The FBI said there were hundreds of rounds of spent ammunition as well as “preloaded high-capacity magazines,” found in suitcases that Mr Paddock had brought to the room. Investigators also found body armour, range finders and a homemade gas mask.

Las Vegas shooting – in pictures Show all 15 1 /15 Las Vegas shooting – in pictures Las Vegas shooting – in pictures People scramble for shelter at the Route 91 Harvest country music festival after gun fire was heard Getty Las Vegas shooting – in pictures People carry a person at the Route 91 Harvest country music festival after shots were fired David Becker/Getty Las Vegas shooting – in pictures People run from the Route 91 Harvest country music festival after gun fire was heard David Becker/Getty Las Vegas shooting – in pictures A handout photo released via Twitter by Eiki Hrafnsson (@EirikurH) showing concertgoers running away from the scene (C) after shots range out at the Route 91 Harvest festival on Las Vegas Boulevard EPA/Eiki Hrafnsson Las Vegas shooting – in pictures People lie on the ground at the Route 91 Harvest country music festival after hearing gun fire Getty Las Vegas shooting – in pictures A man in a wheelchair is taken away from the Route 91 Harvest country music festival after hearing gun fire David Becker/Getty Las Vegas shooting – in pictures People stand on the street outside the Mandalay Bay hotel near the scene of the Route 91 Harvest festival on Las Vegas Boulevard EPA/Paul Buck Las Vegas shooting – in pictures FBI agents confer in front of the Tropicana hotel-casino after a mass shooting during a music festival on the Las Vegas Strip Reuters/Las Vegas Sun/Steve Marcus Las Vegas shooting – in pictures Las Vegas police run by a banner on the fence at the Route 91 Harvest country music festival grounds after shots were fired David Becker/Getty Las Vegas shooting – in pictures An injured person is tended to in the intersection of Tropicana Ave. and Las Vegas Boulevard after a mass shooting at a country music festival Ethan Miller/Getty Las Vegas shooting – in pictures Metro Police officers pass by the front of the Tropicana hotel-casino after a mass shooting at a music festival on the Las Vegas Strip Reuters/Las Vegas Sun/Steve Marcus Las Vegas shooting – in pictures A woman sits on a curb at the scene of a shooting outside of a music festival along the Las Vegas Strip AP/John Locher Las Vegas shooting – in pictures A cowboy hat lays in the street after shots were fired near a country music festival in Las Vegas Getty Las Vegas shooting – in pictures Las Vegas Metro Police and medical workers stage in the intersection of Tropicana Avenue and Las Vegas Boulevard South after a mass shooting at a music festival on the Las Vegas Strip Reuters/Las Vegas Sun/Steve Marcus Las Vegas shooting – in pictures Sheriff Joe Lombardo (2-R) speaking during a press briefing in the aftermath of the active shooter incident on Las Vegas Boulevard EPA

Investigators also revealed that Mr Paddock may have been treated for “unidentified medical conditions.” In October, Ms. Danley told investigators that Mr Paddock’s physical and mental health seemed to have deteriorated in recent months.

In an affidavit submitted as part of a search warrant application, an investigator said that access to Ms. Danley’s email account could “lead investigators to determine the full scope of Stephen Paddock’s plan and Marilou Danley’s possible involvement.” The authorities also requested information about several Instagram accounts that they believed were connected to Ms. Danley.

In their requests for data from Instagram, investigators said they were seeking “evidence showing the possession, use, purchase or sale of firearms, firearms accessories, ammunition or explosives by Paddock.” They also sought information about Ms. Danley’s “state of mind as it relates to the crime under investigation” and the identities of anyone who communicated with her about what would amount to violations of federal weapons laws.

Ms. Danley deleted her Facebook account just hours after the attack, investigators wrote in their affidavit. At 12:30 am, about two-and-a-half hours after the shooting began, she changed the status of her account to private. By 2:46 a.m., she had deleted the account entirely.

In September, the court records suggested, Mr Paddock ordered from Amazon a holographic weapon sight that investigators believe he ultimately used during the assault. On Friday night, Amazon listed the same model, which was described as “designed for close-in combat speed and versatility.” The price is $429, according to the listing, which said the sight “improves target acquisition, boosts accuracy and increases control.”

The FBI also discovered emails between two accounts connected to Mr Paddock. One from early July indicated that Mr Paddock had begun taking steps to carry out the attack, referring to a “bump stock,” an attachment that enables a semiautomatic rifle to fire faster.

In an email Mr Paddock sent on July 6 to an account that also may have belonged to him, he wrote: “try an ar before u buy. we have huge selection. located in the las vegas area.” Another email sent between the accounts read, “for a thrill try out bumpfire ar’s with a 100 round magazine.” By “ar,” Mr Paddock appeared to be referring to rifles.

The affidavit later adds that “investigators have been unable to figure out why Stephen Paddock would be exchanging messages related to weapons that were used in the attack between two of his email accounts,” and that it was possible that someone else was controlling one of the accounts. If that was the case, the investigator said, the FBI needed to identify that person. Receiving a search warrant for that account “will lead investigators to determine the full scope of Stephen Paddock’s plan,” an F.B.I agent wrote to the judge.