Broward County, FL - 

XXXTENTACION was gunned down outside of RIVA Motorsports in Pompano Beach, Florida back in June. In footage obtained by TMZ, X’s final moments are captured on surveillance video.

The video was played for the first time inside a Broward County courtroom on Thursday (September 27).

In the clip, two of the four suspects follow X into the dealership before the scene moves outside. From there, two masked men jump out of a black SUV with their weapons and approach X’s BMW. One man is attempting to remove a chain from his neck but X resists.

Kanye West, J. Cole & More Mourn XXXTENTACION's Death

The two men — identified as Michael Boatwright and Trayvon Newsome — continue trying to rob X until Boatwright decides to fire the fatal rounds at point-blank range. Newsome runs off with the Louis Vuitton bag, which allegedly had around $50,000 in it.

Local news station WBLG was in the courtroom as prosecutors played the video during a discovery and bail hearing for suspect Robert Allen.

A fourth suspect, Dedrick D. Williams, is also charged in X’s murder.

X was laid to rest in June following a public, open-casket memorial in Sunrise, Florida.