Investigators search Uvalde school shooting suspect's iPhone

The Texas Rangers requested a search warrant for the device.

The first search warrant returned in the Uvalde, Texas, school shooting sought access to the suspect's iPhone as authorities search for clues that could point to the motive for last week's fatal shooting of 19 children and two teachers.

A black iPhone 13 Pro Max was found next to the body of Salvador Ramos after he was shot and killed by a Customs and Border Protection tactical team, according to the search warrant affidavit.

Investigators from the Texas Department of Public Safety sought permission from a judge to analyze the text messages, photos, videos and other "stored communications" on the phone, according to the affidavit, which was first obtained by Houston television station KHOU.

The Texas Rangers, a division of the Texas DPS, is conducting an investigation into the shooting, one of the deadliest in modern U.S. history.

The document also said the two witnesses to the car wreck that preceded the massacre saw Ramos "dressed completely in black with long shoulder length black hair." The witnesses also told police they saw "the male subject was holding a long rifle and proceeded to load the rifle with a magazine" before he "began to fire multiple gunshots in their direction."

The judge authorized investigators to download the contents of the device.

Ramos' grandfather, Rolando Reyes, whose home he was living in at the time of the shooting, told ABC News the suspect had argued with his grandmother over paying a cellphone bill on the morning of the shooting. However, Reyes said he did not believe it was significant. Ramos allegedly shot his grandmother before driving to the school and opening fire.

Police have applied for and were approved for several other search warrants in the week since the shooting.

Inside the home where Ramos allegedly shot his grandmother, police took "apparent blood stain swabs" along with a spent .223 cartridge, according to a search warrant affidavit.

A separate search warrant was returned for the 2008 Ford F-150 that Ramos allegedly used to drive from his grandmother's house to the school grounds, where he crashed into a ravine and emerged wielding a rifle.

Investigators found a Smith & Wesson rifle and several rifle magazines and cartridges -- some used, but many unused -- throughout the vehicle, according to an inventory submitted back to the court by Texas DPS on Wednesday. Investigators also discovered "an apparent bloodstain" on the center console and took multiple swabs of DNA.

According to the warrant, submitted on May 25, investigators had hoped to obtain physical evidence of Ramos' use of the vehicle, including shoe impressions, fingerprints and blood, but also devices "in which digital media may be stored," including phones and computers.

ABC News has previously reported that authorities have yet to find a specific piece of evidence that explains why the attack occurred May 24 or why Robb Elementary School was the target.