The people responsible for XXXTentacion's death tracked his movements before the shooting outside a motorcycle dealership in South Florida, police revealed.
CCTV footage reportedly studied by detectives showed two men, one in orange sandals, following the rapper into the dealership, where they bought a red mask, Yahoo News reports.
The 22-year-old suspect, Dedrick D. Williams, was arrested Wednesday and charged with first-degree murder, driving without a valid license and probation violation for theft of a car.
Police issued two other arrest warrants for other suspects involved in the rapper's murder. Their identities have not been revealed.
XXX, whose real name was Jahseh Dwayne Onfroy, was ambushed and killed Monday in Florida.
Police said surveillance camera footage showed two men climbing out of a dark SUV and following the rapper into Riva Motorsports in Deerfield Beach at 3:30 p.m. on Monday.
One of the men, reportedly wearing a white tank top and bright orange sandals, bought a mask from the dealership's parts department, detective John Curcio of the Broward County Sheriff's Office said in a sworn court statement obtained by the New York Times.
The men then left the store and moved their vehicle to the entrance of the park. When XXX tried to drive away in his BMW, the suspects stepped out of their car, armed and masked, and "demanded property," the detective wrote.
"After a brief struggle, the victim is shot," Curcio added. XXXTentacion's killers stole a Louis Vuitton bag from his car before driving off.
The rapper's attorney, David Bogenschutz, said investigators told him the rapper had visited a bank shortly before the shooting and possibly withdrew cash to buy a motorbike. He said Onfroy appeared to have been the victim of a "random robbery".
"Jahseh Onfroy — known worldwide as XXXTentacion — tragically passed away from a gunshot wound in Deerfield, Florida," the rapper's representatives said in a statement. "It is with great sadness that the news is confirmed in this official statement by his team — manager Solomon Sobande, EMPIRE, Bob Celestin, Esq. and AKW PR. In deference to his family, friends, and loved ones and in light of further investigation, we ask that their privacy be respected at this time."
They continued, "XXXTentacion touched the lives of millions around the globe and will forever reside in the hearts of countless fans who listened to his music, attended his concerts, and felt the glow of his uncontainable, undeniable, and unique spirit."
XXX's girlfriend revealed on Friday she was pregnant with the artist's baby.
His mother, Cleopatra Bernard, confirmed his girlfriend was pregnant on Instagram, where she posted an ultrasound photo with the caption: "He left us a final gift."
XXX's career was shadowed by controversy, as he waited for a court date given allegations he repeatedly abused his then-girlfriend in 2016. Despite the scandal, his most recent album, ?, debuted at the top of the charts back in March.