Image copyright Jack Mckain

Audio has emerged of late rapper XXXTentacion apparently admitting assaulting his ex-girlfriend and stabbing nine people.

The recording was made in secret and is believed to date from 2016, when he was accused of aggravated battery of a pregnant woman.

The Miami-Dade County state attorney's office said he "makes admissions to multiple criminal acts" in the audio.

The 20-year-old was shot and killed in south Florida in June.

At the time of his death, the star, real name Jahseh Onfroy, was awaiting trial for domestic violence charges, harassment and witness tampering - all of which he denied.

The Miami-Dade County state attorney said the recording was thought to have been made around the time of his arrest in October 2016 for the assault and false imprisonment of his ex-girlfriend, Geneva Ayala.

A spokesman for the state attorney's office said: "Both defense and state believed the tape had confessions of criminal activity on it."

In the recording, the rapper discusses his ex-girlfriend, who he believed had cheated on him.

He can be heard saying: "I put my source of happiness in another person, which was a mistake initially, right? But she fell through on every occasion until now."

He goes on to say how he began assaulting her, adding: "Now she's scared. That girl is scared for her life. Which I understand."

Earlier in the recording, he vowed to kill her "if she play with me".

Image copyright Miami Dade County Corrections/Getty Image caption XXXTentacion's mugshot from December 2017

In addition to the threats against his ex-girlfriend, the rapper also referred to a stabbing incident in Florida, saying: "I'm on [Miami] New Times for stabbing, how many people they put in the news? They said three, it was eight. In Deerfield.

"She's seen this..." he continues, referring to Ayala. "She know. So she's scared. She thinks I'm going to kill her."

In January 2016 a local Florida newspaper, the Sun Sentinel, reported that police were "searching for the person who stabbed three people during a fight in Deerfield Beach."

XXXTentacion also admitted to stabbing a former manager, an incident for which he was arrested in Orange County, Florida.

Following the rapper's death, a judge decided to drop the outstanding criminal cases against him.

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