Updated

Florida authorities say a suspect has been arrested in the shooting death of rapper XXXTentacion.

The Broward Sheriff's Office said in a news release sent Thursday morning that 22-year-old Dedrick Devonshay Williams of Pompano Beach was arrested shortly before 7 p.m. Wednesday.

Officials said the musician, whose real name is Jahseh Onfroy, was ambushed by two suspects as he left an upscale motor sports dealership Monday afternoon in his electric BMW. His attorney, David Bogenschutz, said investigators told him the 20-year-old rapper, who pronounced his stage name "Ex Ex Ex ten-ta-see-YAWN," had visited a bank shortly before the shooting and possibly withdrew cash to buy a motorcycle.

Williams is charged with first-degree murder without premeditation. He's being held without bond in the Broward County Jail.

Dedrick Devonshay Williams mug

This photo provided by Broward Sheriff's Office shows Dedrick Devonshay Williams. The Broward Sheriff's Office said in a news release sent Thursday, June 21, 2018, that Dedrick Devonshay Williams was arrested shortly before 7 p.m. Wednesday in the shooting death of rapper XXXTentacion. The 20-year-old rapper was ambushed by two suspects as he left an upscale motor sports dealership on June 18. (Broward Sheriff's Office)

Court records show Williams has been charged previously with several felonies, including grand theft auto, domestic violence, cocaine possession and possession of a firearm by a convicted felon. It does not appear, however, that he has ever done prison time for these charges and some of them were dropped. Williams does not appear in the Florida Department of Corrections offender database.

An attorney for Williams isn't listed on jail records.

The entertainer, who sported dreadlocks and facial tattoos, was a rising star. He notched a No. 1 album in March with his sophomore effort "?'' and had a top 10 hit with "Sad!" but was facing trial on charges that he beat up his pregnant girlfriend.

His brief career was marked by controversy. In 2016, he was arrested on charges including home invasion for a 2015 incident, and less than a month later was jailed on charges that he attacked his girlfriend, who was pregnant at the time. Later, he faced more charges including witness tampering.

In an interview this month with the Miami New Times, XXXTentacion described his upbringing, which included seeing his mother infrequently and being raised by friends, family and baby sitters. His mother bought him clothes, phones and other gifts. He said he used violence so she would engage with him.

In one video on social media, he said: "If worse things come to worse, I (expletive) die a tragic death or some (expletive), and I'm not able to see out my dreams, I at least want to know that the kids perceive my message and were able to make something of themselves."

He continued later: "I appreciate and love all of you and I believe in you all; do not let your depression make you, do not let your body define your soul, let your soul define your body. Your mind is limitless ... you are worth more than you can believe."

The Associated Press contributed to this report.