Renee Black, centre, mother of American rapper A$AP Rocky, leaves the district court in Stockholm, following the second day of testimony. Picture: Fredrik Persson / TT via AP

Stockholm — American rapper A$AP Rocky testified Thursday at his assault trial in Sweden 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.

The recording artist, whose real name is Rakim Mayers, is accused along with two other men believed to be members of his entourage of beating a 19-year-old man, Mustafa Jafari, in Stockholm on June 30. The rapper, 30, pleaded not guilty at the start of the trial Tuesday, saying he acted in self-defense.

Mayers told Stockholm District Court on Thursday that Jafari and his friend refused to leave the entourage alone despite several appeals, and claimed the two appeared to be under the influence of drugs.

He said the situation became tense after Jafari got into an argument with one of Mayers' bodyguards near a fast-food restaurant where the rapper's entourage had stopped to download an app to use electric scooters, which are widely available in Stockholm.

"After a while, my security guard started pushing him away, begging him to leave," said Mayers, who appeared in court wearing an all-green inmate uniform. He testified that he and his entourage just wanted to "de-escalate" the situation.

"Me and my crew told them that, 'Listen, don't go where we are going. Go the other way, we don't want any trouble,'" Mayers said. But he said Jafari just wouldn't go away.

"I assumed that these guys were under the influence of some kind of drug," Mayers told the court.

ASAP Rocky, in a green shirt, second left, and to the right his defence lawyer Slobodan Jovicic, sit at the district court in Stockholm. Court Illustration by Anna-Lena Lindqvist/TT via AP

A full-scale brawl ensued shortly afterward at a nearby side street and prosecutors allege that Mayers and the two other suspects beat and kicked Jafari while he was on the ground. They said Jafari was hit with parts of or a whole bottle.

Jafari had told police earlier that he got angry as his headphones were broken during the initial argument with the bodyguard.

"When he (bodyguard) pushed me, I was both offended and surprised," Jafari testified at court Thursday. "I followed them and said I was going to call the police ... since he had broken my headphones."

People gather outside the district court in Stockholm. American rapper A$AP Rocky pleaded not guilty to assault as his trial in Sweden opened Tuesday, a month after a street fight that landed him in jail and became a topic of U.S.-Swedish diplomacy. Picture; Fredrik Persson/TT News Agency via AP

Mayers' defense lawyer, Slobodan Jovicic, asked Jafari whether he thought the rapper's entourage acted the way it did out due to fear of Jafari.

"Four or five people afraid of me, who's not even half of their body size?" Jafari replied.

Despite being asked several times, it was not clear why Jafari wanted to contact Mayers' entourage in the first place.

Robert C. O'Brien, Special Envoy Ambassador, arrives at the district court in Stockholm. picture: Fredrik Persson/TT News Agency via AP

Jafari told the court his memory of the events that night was confused because of the blows he had received to his head during the brawl.

The trial has created a stir in U.S.-Swedish diplomatic relations after President Donald Trump weighed in to support the Grammy-nominated recording artist.

The case has also drawn the attention of American celebrities and Mayers' fellow recording artists, including Sean "Diddy" Combs and Justin Bieber. A social media campaign has been pressing for his release #JusticeForRocky.

US Attorney Damien Granderson, left, and US rapper A$AP Rocky's defence lawyer Slobodan Jovicic, arrive at the district court in Stockholm, during the second day of his trial. Picture: Fredrik Persson/TT News Agency via AP

Trump has spoken with Swedish Prime Minister Stefan Lofven on the phone, offering to personally guarantee A$AP Rocky's bail, but the Swedish leader said he couldn't interfere in a legal case.

Sweden doesn't have a bail system and Mayers has stayed behind bars since July 3 despite Trump's intervention. Trump has sent Ambassador Robert O. Brien, the U.S. special presidential envoy for hostage affairs, to Sweden to monitor the court proceedings.

In an email, the Swedish government confirmed O'Brien's presence in Stockholm, but noted that "this case is not in any way a 'hostage affair.'"

The rapper's mother, Renee Black, and several relatives were present in the courtroom Thursday.

Jovicic said the rapper, who hails from New York, was happy and relieved to be finally able to tell his side of the story.

Swedish PR consultant Lili Assefa left, and US rapper A$AP Rocky's defence lawyer Slobodan Jovicic, arrive at the district court in Stockholm. Picture: Fredrik Persson/TT News Agency via AP

"I mean, it's a million ways ... that you could alter what he could have done," Jovicic told at a news conference late Thursday.

"But, no, he has no regrets. The only regret he has regarding this situation is that the two boys wouldn't let them be alone, that they just would not let them go away," the rapper's lawyer said.

Swedish newspaper Expressen reported that the U.S. Embassy in Stockholm had asked the Swedish Prosecution Authority earlier this week whether Mayers and the two other suspects could be accommodated in a hotel rather than a jail.

"We replied that it doesn't work that way in Sweden," the authority's spokeswoman, Karin Rosander, told the paper, adding that it would be for the court to decide as charges had been issued already.

The trial is running behind schedule and it remains unclear whether it can finish as originally planned on Friday, when several witnesses were still due to testify.

If convicted, Mayers faces up to two years in prison.