Image copyright Shutterstock Image caption The rapper's latest album debuted at the top of the Billboard 200 chart

US rapper XXXTentacion, who quickly rose to fame with two consecutive hit albums, has been killed aged 20.

He was leaving a motorcycle dealership in south Florida on Monday when a gunman shot him.

Police in Broward County said XXXTentacion, whose real name is Jahseh Onfroy, was taken to hospital where he was pronounced dead.

He was often described as one of rap's most controversial artists and was facing domestic violence charges.

XXXTentacion's lawyer, David Bogenschutz, said on Tuesday that investigators believe the slaying was the result of a random robbery.

Mr Bogenschutz said the rapper may have recently withdrawn cash to buy the motorcycle.

The Broward County Sherriff's Office has offered a $3,000 (£2,200) reward for any information about the killing.

On the same day, up and coming rapper Jimmy Wopo was also killed in a shooting in Pittsburgh. The 21-year-old's manager, Taylor Maglin, confirmed on Facebook the singer had been one of the victims of a drive-by shooting on Monday evening.

Wopo started making music at the age of 14, but had yet to see a breakthrough hit.

Soundcloud rapper

Image copyright AFP Image caption Emergency responders pictured near the XXXTentacion's car following the shooting

XXXTentacion first found an audience by uploading songs to the website SoundCloud. He had been hailed as a breakthrough talent and tributes have been pouring in from hip-hop luminaries in the wake of his death.

Onfroy was leaving the dealership shortly before 16:00 local time when two men approached him, officials say.

At least one of them shot him before both fled the scene in Deerfield Beach, 43 miles (69km) north of Miami, in a dark-coloured SUV.

Video posted on social media apparently showed Onfroy slumped in his car. A witness told celebrity news website TMZ that multiple shots had been fired outside the dealership.

Image copyright Getty Images Image caption XXXTentacion attended last year's BET Hip Hop Awards

The rapper, whose hit songs include SAD! and Moonlight, quickly rose to prominence following the release of his debut album 17 last August.

His follow-up ? debuted at the top of the Billboard 200 chart in March and has been listened to hundreds of millions of times online.

The album tackled subjects such as depression and was praised by some of rap's highest-profile stars.

Image copyright Getty Images Image caption The rapper had a difficult upbringing

But his short career was plagued by allegations of domestic violence. He was facing 15 felony charges at the time of his death, including aggravated battery of a pregnant woman.

From tough upbringing to number one

By Mark Savage, Music Reporter, BBC News

XXXTentacion had a troubled upbringing and was expelled from middle school for fighting, but he channelled his energy and fury into music.

He quickly became the most popular artist in the genre known as SoundCloud Rap, defined by its languid, hazy beats and wide-ranging influences.

His surging popularity was noted by the music industry and, by October 2017, he had scored a distribution agreement reportedly worth $6m (£4.5m).

But his career was already being overshadowed by his legal problems. Fans were apparently unswayed, sending his latest album to number one in the US.

Read more from Mark

Tributes quickly poured in on social media from Kanye West and rapper Sean "Diddy" Combs among others.

Rapper J Cole hailed the star's "enormous talent and limitless potential". "God bless his family, friends and fans," he posted.

Documentary maker Louis Theroux said: "Notwithstanding personal demons, he was a huge talent & bringing a beautiful new feel to hip hop. So sad."