'Ya'll know who I am?': Migos star Offset's livestream captures moment he was detained by police

Rapper Offset has live-broadcast the moment he was detained by police after being pulled over in Los Angeles on the weekend.

The Migos star and husband of Cardi B can be seen arguing with officers in the footage, asking if they know who he is.

Beverly Hills Police released a statement about the incident, in which a 20-year-old man also in Offset's car was arrested over allegedly pointing a firearm at a passerby from the vehicle.

"You told me to put my hands up, I'm not doing that," says Offset, real name Kiari Cephus, in the video.

"There's 25,000 people on my live. You're going to get sued publicly... I'm going to sue the shit out of you, ya'll know who I am?"

Police officers tell Offset to turn his car off and not to move, before opening the car door themselves.

"No! That's not legal, that's not legal - you can't just open my door!" he says in the footage.

"What is you grabbing my f**king wrist for? So aggressive!"

Part of the livestream has been republished by various social media users and news outlets, but the video stops after Offset gets out of his vehicle.

Police say that he was not arrested but 20-year-old Marcelo Almanzar was charged with carrying a concealed weapon and carrying a loaded firearm in public.

His bail was set at US$35,000, but the person who alleges they had the firearm pointed at them does not want to press charges.

In the video, Offset refers to "somebody beating up my car with a flag". A statement by the rapper's representatives to People says he had been attacked "by aggressive Trump supporters".

"Offset thanks his fans for their support and wishes everyone peace and safety during these trying times," the statement continued.

"He encourages everyone to get out and vote because nothing changes if nothing changes."