Media playback is unsupported on your device Media caption Who is ASAP Rocky and why is he on Trump's radar?

The summer of 2019 won't be one that brings back the best memories for ASAP Rocky.

The rapper spent most of July behind bars in Sweden after a violent incident on the streets of Stockholm between him, his entourage and two unknown men.

It was eventful - from rumours he was being held in terrible conditions, to accusations of "systemic racism" and even a minor political scuffle on Twitter between the President of the United States and Swedish politicians.

ASAP was arrested at the start of July and on 14 August, a jury found him guilty of assault and gave him a suspended sentence.

Here's a complete timeline of what happened inbetween.

30 June 2019: Fight in Stockholm

ASAP Rocky is in Sweden to perform at Smash festival, but while walking through the country's capital a few days later a fight breaks out on the street near the Max Burger chain.

3 July: ASAP Rocky arrested

ASAP Rocky (real name Rakim Mayers) and two members of his entourage - Bladimir Corniel and David Rispers - are arrested in Sweden on 3 July 2019, accused of aggravated assault.

The previous day, ASAP had posted videos on Instagram showing two men following him and his entourage around Stockholm.

Image copyright Getty Images/Swedish Prison and Probation Office Image caption ASAP Rocky and the Kronoberg prison where he was held for much of July 2019

In one of the videos, which are still online, ASAP says he doesn't want any trouble with the pair.

5-7 July: Pulls out of UK festivals

After his arrest, ASAP is detained for two weeks by Swedish police, throwing his tour plans into chaos.

ASAP was due to perform at Longitude Festival in Dublin and Wireless Festival in London a few days after his arrest.

J-Hus and Rae Sremmurd are drafted in as replacements at Wireless, Poland's Open'er Festival gets Stormzy, and Ski Mask The Slump God fills in at Longitude.

9 July: Rumours about prison conditions

US gossip website TMZ describes Kronoberg remand prison, where ASAP is being held, as "shockingly inhumane," according to reports from unnamed sources.

But the governor of the prison denies these claims - saying after a recent refurbishment it's in "good condition", and that all inmates have access to a bed and TV.

Image copyright Swedish Prison and Probation Office Image caption Kronoberg authorities say this is representative of its prison cells

However, ASAP Mob member ASAP Ferg says that Rocky is being held in solitary confinement.

19 July: Police investigate an alleged victim

While it is ASAP and his entourage who are locked up over the incident, one of the two men they allegedly fought with also finds himself under scrutiny by the police.

He is investigated by Swedish authorities for abuse, assault and attempted assault.

19 July: A victim of 'systemic racism'?

ASAP isn't the only rapper to have found himself in trouble with the Swedish authorities.

G-Eazy, real name Gerald Earl Gillum, was arrested in Sweden in 2018 for assault, possession of drugs and use of narcotics.

After pleading guilty G-Eazy was sentenced to probation, given a $10k fine, and released after a day-and-a-half.

G-Eazy says the reason he was released so much more quickly than ASAP was "white privilege".

19 July: Donald Trump gets involved

After two weeks behind bars - and as Swedish authorities decide to hold ASAP Rocky for an extra week - Donald Trump says that he is trying to secure the rapper's release.

He tweets to say he is in communication with the Prime Minister of Sweden, prompted by a conversation with Kanye West.

But Mr Trump later reacts angrily when he is unable to secure ASAP's immediate release.

Former Swedish Prime Minster Carl Bildt explains that ASAP will receive the same treatment as any other prisoner and Mr Trump's interference won't have any effect.

22 July: Case against alleged victim closed

The alleged victim being investigated at the same time as ASAP Rocky has his case closed.

24 July: Mum's concerns

Swedish newspaper Expressen speaks to ASAP's mum, Renee Black, in New York in late July, and she talks about her concerns for her son.

"He was just telling me that he isn't really eating properly. He can't wait to get back into the gym," she tells the newspaper.

"Everything is on video. They tried to avoid it but they kept being followed as well as harassed. Come on, just ball it up and trash it because that's what it is, trash."

25 July 2019: Police formally charge ASAP with assault

Three weeks after he is first arrested, Swedish police decide there is enough evidence to charge ASAP with assault causing actual bodily harm.

The two men arrested with him are also charged with assault.

The Swedish prosecutor tells Radio 1 Newsbeat that the videos seen on ASAP Rocky's Instagram are only part of the evidence in the case.

"My evidence consists partly of a number of films that I will play in court. Some are known to the public and some are not," Daniel Suneson says, referencing CCTV footage.

Image copyright Getty Images Image caption Renee Black, ASAP's mum, attends the trial in Stockholm

Mr Suneson also says the reason ASAP has been held for such a long time is because of worries that the three suspects will "leave the country if they were released".

There are initially two alleged victims in the case, but the allegations concerning one are dropped "due to insufficient supporting evidence".

30 July: ASAP Rocky pleads not guilty

ASAP's trial, which is expected to last three days, begins - but is delayed starting due to the massive media and fan interest in the case.

He and the two men arrested with him plead not guilty.

The media hears some of the evidence against ASAP for the first time, with the prosecution alleging that something like a bottle was used in the assault.

1 August 2019: ASAP goes to court

The following day, it's ASAP's chance to give evidence.

He tells Stockholm District Court: "There's a million things that we could have did, but we decided to walk away."

He also says he wants his name cleared and felt threatened by the people who clashed with his entourage in July.

"It got a little scary for us. I couldn't help but assume that these guys were under the influence of some type of drugs," he says.

Image copyright Getty Images Image caption The jurors in the trial will return their verdict on 14 August 2019

During the trial, the court is shown footage of ASAP holding a glass bottle, but says he was only holding it briefly during the confrontation.

He insists he didn't use it to hurt the alleged victim.

2 August 2019: ASAP goes home

Despite earlier concerns that ASAP might flee the country, he is freed to go home on 2 August.

He describes his experience behind bars in Sweden as "difficult and humbling".

Today, Wednesday, he'll find out whether he will face more jail time - the prosecution have called for ASAP to be jailed for six months.

Image copyright Reuters Image caption ASAP Rocky (back right) smiled widely as he left the district court

Being allowed to go home may point to an acquittal, or a sentence of less than the time already served, Reuters reports.

Since returning home, ASAP gets back to the day job and performs his first show in over a month at the Real Street Festival in Anaheim, California.

14 August: ASAP is found guilty

Six weeks after his initial arrest, ASAP is found guilty of assault during the Stockholm brawl and given a suspended sentence.

The rapper, Bladimir Corniel and David Rispers "assaulted the victim by hitting and kicking him as he lay on the ground. The artist has also thrown the victim to the ground and stepped on his arm," say the court in its verdict.

The accused were "not in a situation where they were entitled to self-defence," they say.

Follow Newsbeat on Instagram, Facebook, Twitter and YouTube.

Listen to Newsbeat live at 12:45 and 17:45 weekdays - or listen back here.