A$AP Rocky, right, leaves the district court after the third day of his trial in Stockholm, Friday, Aug. 2, 2019. A Swedish court has ruled that American rapper A$AP Rocky and two other U.S. suspects can be freed from detention until Aug. 14, when the verdict on their assault case will be announced. Prosecutor Daniel Suneson said in his closing comments that he was seeking a six-month sentence for the rapper. (Fredrik Persson/TT News Agency via AP)

STOCKHOLM (AP) — Rapper A$AP Rocky and two other American suspects were temporarily freed from a Swedish jail and planning to head back to the U.S. on Friday as judges mull a verdict in the assault case against them.

The Stockholm District Court released the 30-year-old rapper, whose real name is Rakim Mayers, as well as David Rispers Jr. and Bladimir Corniel until Aug. 14 —when a verdict is expected in the case. They are accused of beating 19-year-old Mustafa Jafari on June 30 outside a fast-food restaurant in central Stockholm.

The three suspects were seen hugging each other at the court after they learned they would be released as some of the public gathered inside the courthouse loudly cheered.

Mayers' mother, Renee Black, who was present throughout the court proceedings, was with her son when he was released. A private plane was waiting at the Stockholm Arlanda Airport to transport the suspects and Black back to the U.S. Friday evening, according to the Swedish newspaper Aftonbladet.

Mayers shared an emotional post on Instagram after he was released, thanking his fans for their support during this "very difficult and humbling experience."

President Donald Trump, who had caused a stir in U.S.-Swedish diplomatic relations after publicly offering support to the Grammy-nominated recording artist, celebrated Mayers' release, tweeting , "It was a Rocky Week, get home ASAP A$AP!"

Swedish Prime Minister Stefan Lofven heard an appeal from Trump in July, but said he couldn't interfere in a legal case.

Robert O'Brien, a U.S. special presidential envoy sent to monitor the court proceedings, stressed that Washington was "grateful that I got to attend and observe the judicial process" in Sweden.

The case has also drawn the attention of celebrities, including Sean "Diddy" Combs and Justin Bieber, and a social media campaign that was pressing for the rapper's release.

Mayers' release came after his three-day trial concluded Friday.

One of the witnesses to the assault revised her story from initial police reports, testifying that she didn't actually see Mayers hit Jafari with a bottle — a key issue the trial focused on. She and a friend, testifying anonymously at Stockholm District Court, both maintained their previous statements to police that they saw Mayers and his partners assaulting Jafari.

"Everything happened very quickly. We were scared for our lives," the first woman told the court in Swedish. "He (Jafari) was bleeding. He showed his injuries on his hand. He also said he had a sore back."

The rapper pleaded not guilty at the start of the trial Tuesday, saying he acted in self-defense when Jafari and another man would not leave them alone. He had been behind bars since he was arrested on July 3.

Mayers' bodyguard, Timothy Leon Williams, also testified Friday, sharing a similar story to what the rapper told the courtroom when he took the stand earlier in the week.

Williams said he asked Jafari to "go away" when he approached the group a second time outside the restaurant.

"I knew something's not right about him. I'm noticing it because I'm a bodyguard," Williams said in English. "And now, I'm looking at him like, 'Yo, what's wrong with you?' I'm looking at him and saw that his eyes were really glossy, like he's on something."

Mayers had also testified earlier this week that he suspected Jafari and his friend were under the influence of some drug, which officials have not yet commented on.

___

Tanner reported from Helsinki.

___

This story has been corrected to show Swedish Prime Minister Stefan Lofven and President Donald Trump spoke on July 20, not earlier this week.

FILE - This Feb. 9, 2019 file photo shows A$AP Rocky at Pre-Grammy Gala And Salute To Industry Icons in Beverly Hills, Calif.  Prosecutors in Sweden are dropping the investigation of a man they say was involved in a fight with American rapper A$AP Rocky. The platinum-selling, Grammy-nominated artist whose real name is Rakim Mayers, has been behind bars since early this month as police investigate the fight in Stockholm.(Photo by Richard Shotwell/Invision/AP, File)
One of A$AP Rocky's bodyguards arrives at the district court in Stockholm, Friday Aug. 2, 2019, the third day of A$AP Rocky's trial. American rapper A$AP Rocky testified Thursday at his assault trial that he did everything possible to avoid a confrontation with two men he said were persistently following his entourage in Stockholm, but one of those men picked a fight with one of his bodyguards. (Fredrik Persson/TT via AP)
A$AP Rocky, rear, and his defence lawyer Slobodan Jovicic in the district court in Stockholm, Friday Aug. 2, 2019, on the third day of A$AP Rocky's trial. American rapper A$AP Rocky testified Thursday at his assault trial that he did everything possible to avoid a confrontation with two men he said were persistently following his entourage in Stockholm, but one of those men picked a fight with one of his bodyguards. (Court Illustration by Anna Harvard/TT via AP)
Robert C. O'Brien, Special Envoy Ambassador, arrives at the district court in Stockholm, Friday Aug. 2, 2019, the third day of A$AP Rocky's trial. American rapper A$AP Rocky testified Thursday at his assault trial that he did everything possible to avoid a confrontation with two men he said were persistently following his entourage in Stockholm, but one of those men picked a fight with one of his bodyguards. (Fredrik Persson/TT via AP)
A$AP Rocky's defence lawyer Slobodan Jovicic leaves the district court after the third day of his trial in Stockholm, Friday, Aug. 2, 2019. A Swedish court has ruled that American rapper A$AP Rocky and two other U.S. suspects can be freed from detention until Aug. 14, when the verdict on their assault case will be announced. Prosecutor Daniel Suneson said in his closing comments that he was seeking a six-month sentence for the rapper. (Naina Helen Jama/TT News Agency via AP)
Renee Black, mother of A$AP Rocky, center, leaves the district court after the third day of his trial in Stockholm, Friday, Aug. 2, 2019. A Swedish court has ruled that American rapper A$AP Rocky and two other U.S. suspects can be freed from detention until Aug. 14, when the verdict on their assault case will be announced. Prosecutor Daniel Suneson said in his closing comments that he was seeking a six-month sentence for the rapper. (Fredrik Persson/TT News Agency via AP)
Renee Black, mother of ASAP Rocky arrives at the district court in Stockholm, Friday Aug. 2, 2019, the third day of A$AP Rocky's trial. American rapper A$AP Rocky testified Thursday at his assault trial that he did everything possible to avoid a confrontation with two men he said were persistently following his entourage in Stockholm, but one of those men picked a fight with one of his bodyguards. (Fredrik Persson/TT via AP)
This undated photo made available by the Swedish Police via the Swedish Court, shows an injury sustained by Mustafa Jafari, the alleged victim involved in a fight with rapper A$AP Rocky on June 30, 2019. A Swedish prosecutor on Thursday July 25, 2019 charged rapper A$AP Rocky with assault over the fight in Stockholm, in a case that has drawn the attention of fellow recording artists as well as U.S. President Donald Trump. (Swedish Police via Swedish Court via AP)
A$AP Rocky, third left, and to the right his defence lawyer Slobodan Jovicic in the district court in Stockholm, Friday Aug. 2, 2019, the third day of A$AP Rocky's trial. American rapper A$AP Rocky testified Thursday at his assault trial that he did everything possible to avoid a confrontation with two men he said were persistently following his entourage in Stockholm, but one of those men picked a fight with one of his bodyguards. (Court Illustration by Anna Harvard/TT via AP)
A$AP Rocky's bodyguard, center, leaves the district court after the third day of his trial in Stockholm, Friday, Aug. 2, 2019. A Swedish court has ruled that American rapper A$AP Rocky and two other U.S. suspects can be freed from detention until Aug. 14, when the verdict on their assault case will be announced. Prosecutor Daniel Suneson said in his closing comments that he was seeking a six-month sentence for the rapper. (Naina Helen Jama/TT News Agency via AP)