Image copyright Getty Images

ASAP Rocky will perform at the Real Street Festival in Anaheim, California on Sunday 11 August, event officials have confirmed.

It will be his first solo performance since being temporarily freed from custody in Sweden.

He has pleaded not guilty to assaulting a 19-year-old man in Stockholm in June.

The rapper has been allowed out of the country before a judge delivers a verdict on 14 August.

Image copyright Getty Images Image caption He will find out the judge's verdict three days after the performance

The 30-year-old, real name Rakim Mayers, has missed multiple festival appearances since his arrest in July, including Longitude Festival in Ireland and Wireless Festival in London.

Last week a court heard evidence and testimonies about the brawl which led to his arrest.

ASAP Rocky, as well as two friends, have pleaded not guilty to the charges they face, and say they acted in self-defence.

The judge will now consider all the evidence and decide on a verdict. He landed back in the US at the weekend.

President Donald Trump said that he had spoken to Swedish prime minister Stefan Lofven about the case prior to the rapper's release.

Mr Trump also said on Twitter that Sweden had "let our African American community down".

ASAP Rocky is set to perform at this weekend's festival alongside acts like Cardi B, Big Sean and Future.

Follow Newsbeat on Instagram, Facebook, Twitter and YouTube.

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