The killers of the rapper XXXTentacion were tracking him in his last moments on Monday afternoon, following the rapper into a motorcycle dealership before shooting and robbing him in his car less than half an hour later, according to court documents.

In a sworn affidavit, Detective John Curcio of the Broward Sheriff’s Office described detailed evidence taken from video surveillance — including images of orange sandals worn by one of XXXTentacion’s killers — that led to the arrest on Wednesday of Dedrick D. Williams, 22, on charges including first-degree murder.

In the affidavit, Detective Curcio says that XXXTentacion, an influential 20-year-old rapper whose real name was Jahseh Onfroy, arrived at Riva Motorsports in Deerfield Beach, Fla., at 3:30 p.m. on Monday, with an unidentified friend. Two minutes later, two men got out of a dark sport utility vehicle and followed the rapper into the store; one, described as wearing a white tank top and bright orange sandals, bought a mask at the parts department, paying cash.

Image Dedrick Devonshay Williams Credit... Broward Sheriff's Office, via Associated Press

The two men then left the store and moved their car to the north gate of the parking lot, where, according to the affidavit, XXXTentacion tried to exit in his BMW at 3:55. The S.U.V. blocked him, and the two men — now masked and armed — stepped out of the car and “demanded property.”