A$AP Rocky has been released from jail.

The rapper has been behind bars since July 5, after he was allegedly involved in a fight in Stockholm, Sweden, prior to a music festival, and after making his first testimony during his trial this week, he has now been released.

A$AP confirmed the news on Friday (02.08.19), when he took to Instagram to share a touching message of gratitude towards his fans for their support.

He wrote: ''THANK YOU FROM THE BOTTOM OF MY HEART TO ALL OF MY FANS, FRIENDS AND ANYONE ACROSS THE GLOBE WHO SUPPORTED ME DURING THESE LAST FEW WEEKS I CANT BEGIN TO DESCRIBE HOW GRATEFUL I AM FOR ALL OF YOU THIS HAS BEEN A VERY DIFFICULT AND HUMBLING EXPERIENCE I WANT TO THANK THE COURT FOR ALLOWING ME BLADI AND THOTO TO RETURN TO OUR FAMILY AND FRIENDS THANKS AGAIN FOR ALL OF THE LOVE AND SUPPORT (sic)''

Earlier this week, the 30-year-old rapper detailed his side of the ''scary'' altercation that had led to his arrest.

He told the court: ''Everything seemed to be going fine. Next thing I know, my security guard was lifting one of them ... [it] got a little scary. We didn't want to provoke these guys, we just wanted to get away from them. Mustafa was fearless, his eyes were all weird, he came up to a big bodyguard and asked us questions he knew we couldn't answer. He looked like he was on drugs.''

However, prosecutor Daniel Suneson has alleged that surveillance footage from a nearby restaurant was changed by the rapper's team to coincide with his self-defence claim. He says the unedited footage ''disproves the use of emergency defence''.

Although he is a free man once more, A$AP and the two other suspects arrested alongside him may be taken into custody again, as a verdict on the case is not set to be made until August 14.