CNN  — 

A$AP Rocky will go on trial in Sweden on Tuesday, after spending much of the past month in jail.

The American rapper has been charged with assault after a confrontation in Stockholm in late June, according to prosecutors. The 30-year-old – whose real name is Rakim Mayers – has been in custody since July 3.

The case sparked interest around the world after US President Donald Trump publicly demanded the rapper’s release, to little effect.

Here’s what we know:

What happens at the trial?

The trial at the Stockholm District Court starts on Tuesday and is scheduled to continue on Thursday and Friday. Proceedings will be held in a special secure courtroom, according to the court officials.

Under Swedish law, A$AP Rocky could face a maximum penalty of two years in prison. However, according to Swedish media, the prosecutors have indicated they do not expect to ask for the maximum penalty.

What is A$AP Rocky accused of?

The rapper was arrested following a confrontation in the Swedish capital on June 30.

Public prosecutor Daniel Suneson has alleged that A$AP Rocky and two other men assaulted another man by kicking and beating him with a whole or part of a glass bottle, according to court documents seen by CNN.

Suneson said that he had determined the events constituted a crime “despite claims of self-defense and provocation,” after reviewing videos and witness statements.

All three have been charged for their involvement in the brawl.

What does the defense say?

The rapper’s lawyer, Slobodan Jovicic, has said his client is innocent, and was simply defending himself.

“We think it was self-defense, but the prosecutor has chosen to go with the injured party’s version,” Jovicic said, adding that his client is “very disappointed” that the prosecutor has “chosen to go with the other party’s version” of events.

Video clips shared on Instagram by A$AP Rocky show the rapper and his companions repeatedly asking two men to stop following them. The rapper wrote in a caption that one of the men hit a member of his security team “in the face with headphones,” and reasserted that he was “innocent.”

In another video posted by TMZ, A$AP Rocky appears to grab one of the men and throw him to the ground. Another angle appeared to show the rapper and members of his entourage kicking and punching the man.

How did Trump get involved?

The case took an unexpected turn earlier this month after Trump weighed in, campaigning for the rapper’s release. He said on Twitter that he had spoken with Swedish Prime Minister Stefan Löfven and “offered to personally vouch for (A$AP Rocky’s) bail, or an alternative.”

But Swedish law doesn’t have a bail system, and Suneson said the court decided the 30-year-old rapper should remain in prison because he was deemed a “flight risk.”

After Swedish authorities refused to release the musician, Trump tweeted: “Give A$AP Rocky his FREEDOM. We do so much for Sweden but it doesn’t seem to work the other way around. Sweden should focus on its real crime problem!”

In response, Löfven’s spokesperson Mikael Lindström said in a statement to CNN that “all people in Sweden are equal before the law.”

“All I can say at this point, is that Sweden and Prime Minister Stefan Löfven have explained and emphasized the complete independence of the Swedish judicial system, prosecutors and courts,” Lindström said. “The Government is not allowed, and will not attempt, to influence the legal proceedings, which are now ongoing.”

Several high profile celebrities including Kim Kardashian West, musical artists Post Malone and Shawn Mendes and actress Jada Pinkett Smith have thrown their support behind the petition using the hashtag “JusticeForRocky.”

Veronica Stracqualursi, Eliza Mackintosh, Per Nyberg, Saskya Vandoorne, Melissa Bell, Arnaud Siad and Bianca Britton contributed reporting.