Image copyright Getty Images Image caption Rich The Kid, 26, released his debut album, The World Is Yours, last year

US rapper Rich The Kid has been caught up in an armed robbery at a recording studio in California.

The attack was targeted at Rich, who was outside the studio at the time. Other members of his entourage were attacked and one, thought to be a bodyguard, was beaten with a firearm.

R&B star Usher was inside the studio, but was not involved.

A man who was seen running away from the studio fired several shots before escaping in a car, said one eyewitness.

"He took out a gun, he fired six shots into the street," Ray Leon told ABC 7 Eyewitness News.

"I just heard pop, pop, pop. There was about six pops. I got down really quick. He was firing and that car sped away."

'Posing with cash'

The incident took place at California's Westlake Recording Studio, which has played host to artists like Michael Jackson, Rihanna, Madonna, Frank Ocean, Britney Spears and Justin Bieber in the past.

Hours before the attack, Rich posted a picture of himself posing next to a purple Lamborghini, holding what appeared to be a bundle of bank notes, with the caption "Always in bank mo deposit."

Image copyright Rich The Kid / Instagram

The West Hollywood sheriff station confirmed the robbery in a statement.

"When deputies arrived at the location they found three male black assault victims," it said. The victims reported that "three male black suspects confronted them in the alley behind a business and demanded their money and jewellery. The victims were then physically assaulted by the suspects."

Authorities say three victims were treated at the scene and released. Their injuries were apparently not serious enough to require hospital treatment.

Rich, whose real name is Dimitri Roger, was also filmed speaking to paramedics by local news crew. He was wearing the same outfit seen in his Instagram post; and did not appear to be injured.

A spokesperson for Rich the Kid said "Rich is ok" , but declined to add further details.

The 26-year-old gained notoriety via a series of collaborative mixtapes with rap trio Migos. He's since worked with Kendrick Lamar, Khalid and Wiz Khalifa; and reached the UK top 20 last year with a guest verse on Jax Jones and Mabel's dance track Ring Ring.

Wednesday's incident wasn't the first time Rich the Kid had been the victim of armed robbery. Last summer, he was injured during a home invasion at his girlfriend's house in Los Angeles.

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.