US rapper A$AP Rocky and two of his friends were released from custody in Sweden on Friday three days into their highly publicized assault trial, a development hailed by President Donald Trump who had tried to intervene in the case.The judge, Per Lennerbrant, said the three were free to leave the country ahead of his verdict due on Aug. 14 - a ruling that in Sweden often points to an acquittal or a sentence that is less than the time that defendants have already served. Trump tweeted: "A$AP Rocky released from prison and on his way home to the United States from Sweden. It was a Rocky Week, get home ASAP A$AP!"A$AP Rocky, whose real name is Rakim Mayers, took off by plane from Stockholm's Arlanda airport in the evening. Swedish media reported that he was leaving the country.At the judge's announcement, an emotional Mayers shared a long hug with his lawyer, then with his co-defendants, and then ran over to the courtroom gallery to hug his friends and family who cheered the decision.Later on Instagram, Mayers thanked his friends and fans. "I want to thank the court for allowing me, Bladi and Thoto to return to our family and friends," he added, referring to his co-defendants.Mayers was detained following a brawl in downtown Stockholm on June 30. He and two of his entourage were charged with assault causing actual bodily harm. All three pleaded not guilty. The rapper told the court that he had acted in self-defense after his bodyguard was attacked.The case has drawn huge media attention, particularly since Trump asked Swedish Prime Minister Stefan Lofven to help free Mayers. Lofven declined, saying Sweden's judiciary was independent.