Cardi B was cleared of assault by a Los Angeles jury after a security guard sued her for $24m (£18m) in a fingernail attack.

Emani Ellis alleged that the US rapper cut her cheek with a 3in (7.5cm) fingernail and spat on her outside an obstetrician's office in 2018. The rapper was pregnant at the time, which wasn't public knowledge.

The civil trial in Alhambra led to a series of viral moments as the rapper took the stand and offered colourful testimony about the incident and her fashion choices.

She told the court that the guard followed her and filmed her on her phone and wouldn't give her space or privacy. Ms Ellis, though, said it left her traumatised.

The jury took only about an hour to clear the Grammy-winning rapper of the allegations of assault, battery and intentional infliction of emotional distress as well as negligence and false imprisonment.

Speaking to reporters following the ruling, Cardi B said: I work all day and I work hard for my money, for my kids, for the people that I take care of. So don't you ever think that you're going to sue me, and I'm just going to settle.

The case revolved around Cardi B's obstetrics appointment, when she was four months pregnant with her first child. The office closed for the day to shield her privacy, as her pregnancy was not publicly known.

Cardi B acknowledged to the court that she and Ms Ellis had a profanity-laden shouting match after she showed up to the doctor's appointment. She said it was very heated - but she denied ever touching the guard or spitting on her.

The performer, whose real name is Belcalis Marlenis Almánzar, added that Ms Ellis appeared to record her on her phone and refused to back up, before a face-to-face verbal altercation ensued.

Her lawyer noted how the star had feared for her unborn baby and hadn't discussed the news of her pregnancy publicly yet.

Cardi B's testimony went viral as she changed wigs and outfits each day of the trial - the length of her fingernails becoming a focus multiple times in the case.

Outside the courthouse in Los Angeles County, a handful of fans showed up to support the rapper. Christine Orozco who lives near the court showed up with a hand drawn sign that read, If the nail don't fit, u must acquit, a pun referencing another Los Angeles celebrity trial - that of OJ Simpson.