FORT LAUDERDALE, Fla. — A suspect has been charged in the shooting death of rising rap star XXXTentacion, authorities in Florida said Thursday.

Dedrick Williams, 22, of Pompano Beach was arrested shortly before 7 p.m. Wednesday, the Broward Sheriff's Office said in a news release sent Thursday morning.

Jahseh Onfroy, 20, who went by the stage name pronounced "Ex Ex Ex ten-ta-see-YAWN," was gunned down Monday as he left an upscale motorcycle dealership near Fort Lauderdale where he was planning to make a purchase.

Jahseh Onfroy Miami-Dade Corrections and Rehabilitation Department via AP

Authorities said the rapper was ambushed by two suspects. His attorney, David Bogenschutz, said Tuesday that investigators told him XXXTentacion had visited a bank shortly before the shooting and possibly withdrew cash to buy a motorcycle at Riva Motorsports in Deerfield Beach.

He was exiting the dealership in his luxury BMW electric car when he was shot.

Williams is charged with first-degree murder without premeditation, a probation violation, and with failing to have a valid driver's license. He was being held without bond in the Broward County Jail on Thursday.

Court records show that 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. No further details were immediately available.

Dedrick Williams Broward County Sheriff's Office via AP

XXXTentacion, 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 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 a recent interview 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, which has since been deleted, 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."