XXXTentacion's alleged murderer is in custody ... TMZ has confirmed.
The suspect's name is Dedrick D. Williams, and Broward County Sheriff's Dept. took the 22-year-old into custody Wednesday evening and booked him for first-degree murder.
During a vigil Wednesday night in South Florida ... X's mother told family and friends she'd just gotten notice from police that they'd made the arrest.
Someone at the gathering mentioned there was a chase on the nearby highway I-95 ... which may have ended with cops nabbing Williams for the murder of X.
Williams was also hit with a probation violation for a previous grand theft auto charge. We're told he is being held without bail.
TMZ broke the story .... the 20-year-old rapper was gunned down Monday afternoon as he sat in his car outside a motorcycle dealer. The murder happened in broad daylight, and there were several witnesses -- some of whom reported seeing 2 masked men flee the scene.
As we told you, police also had surveillance videos to go on during the investigation.