(Bloomberg) -- A Swedish court handed out a conditional jail sentence to U.S. rapper A$AP Rocky for his role in a street brawl in Stockholm in June.

The Stockholm District Court on Friday said A$AP Rocky, whose real name is Rakim Mayers, committed assault when he kicked and punched a 19-year-old man who trailed his entourage on the streets of Stockholm. Since the sentence is conditional, Mayers won’t have to serve time unless he’s convicted of other crimes in Sweden during a two-year period of probation.

“Based on statements from two witnesses, the court finds that the defendants weren’t subject to a current or imminent criminal attack,” the court said in a statement. “Therefore, they were not in a situation where they were entitled to use violence in self-defence.”

The case, which led to tension between Sweden and the U.S. after President Donald Trump on Twitter argued for his release from detention, was decided by the Stockholm District Court after a three-day trial. A$AP Rocky was released after the trial and he has now returned to the U.S.

In police interrogations and at the trial, A$AP Rocky admitted kicking and punching a man who followed his entourage, but claimed self-defense. Two other associates who were charged with assault were also given conditional sentences, the court said.

The prosecutor had argued that Rocky should be given a six-month prison sentence, but the court said there were aggravating as well as extenuating circumstances, and ruled that “the assault has not been of such a serious nature that a prison sentence must be chosen.”

The rapper’s situation became global news after Trump to tried to intervene on his behalf by speaking to Swedish Prime Minister Stefan Lofven. The U.S. president later lambasted Sweden’s government for not forcing prosecutors to free A$AP Rocky, and dispatched his special envoy on hostages, Robert C. O’Brien, to oversee the proceedings.

Sweden doesn’t have a bail system, and the constitution bars politicians from interfering in legal cases since the judiciary is completely independent.

To contact the reporter on this story: Niclas Rolander in Stockholm at nrolander@bloomberg.net

To contact the editors responsible for this story: Anthony Palazzo at apalazzo@bloomberg.net, Jonas Bergman, Tasneem Hanfi Brögger

©2019 Bloomberg L.P.