ASAP Rocky will stay in a Swedish jail for at least another week after prosecutors were granted more time to investigate an alleged assault.
The American rapper has been held since being arrested on suspicion of assault on 3 July.
A prosecutor now has until 25 July to decide whether to charge him, Stockholm District Court decided.
One of ASAP Rocky's alleged victims is also being investigated for abuse, assault and attempted assault.
Hearings to decide whether to keep two other men detained - who were arrested with ASAP - are ongoing.
The court decided ASAP should stay in custody "because of the flight risk", says prosecutor Daniel Suneson.
"This gives us time to complete the investigation."
Donald Trump wants ASAP situation 'resolved'
President Trump has said he plans to intervene after speaking to Kanye West about ASAP.
Just spoke to @KanyeWest about his friend A$AP Rocky’s incarceration. I will be calling the very talented Prime Minister of Sweden to see what we can do about helping A$AP Rocky. So many people would like to see this quickly resolved!— Donald J. Trump (@realDonaldTrump) July 19, 2019
ASAP and Kanye first collaborated in 2015 on ASAP's track, Jukebox Joints.
On 5 July, the rapper was held for an extra two weeks while the investigation carried on.
Now that two weeks is up prosecutors have applied for another extension until 25 July to formally charge him with a crime.
"We have worked intensively with the investigation and need more time, until Thursday next week in order to complete the preliminary investigation," Mr Suneson says.
Prosecutors say ASAP - real name Rakim Mayers - was involved in a fight in Stockholm on 30 June, where he'd been playing at a festival.
A video published online appeared to show him punching another man in the street.
But the rapper also put videos of his own up on social media. He says they're from before the fight and they show the man following him.
ASAP's bodyguard, who had also been arrested on suspicion of assault, was released earlier in July.
Thank you @realDonaldTrump , @SecPompeo, Jared Kushner & everyone involved with the efforts to Free ASAP Rocky & his two friends. Your commitment to justice reform is so appreciated 🙏🏼🤞🏼 https://t.co/Ym1Rzo5Z6c— Kim Kardashian West (@KimKardashian) July 18, 2019
Kim Kardashian West has also revealed she's been involved in trying to help ASAP.
She tweeted a link to a story on TMZ, which reported that she and husband Kanye West had spoken to President Trump about getting ASAP released.
"President Trump is very much aware of A$AP Rocky's legal sitch in Sweden - and he's got his team working to get him freed ... thanks in part to Kim K and Kanye West," the report says.
The prison holding the rapper denied he was being held in poor conditions after it was claimed Kronoberg prison is like "walking into a toilet".
That was what showbiz website TMZ reported was said by a US Embassy official.
A source reportedly told them he was being made to sleep on a yoga mat with no blanket, drink water that was not clean, and had only been given an apple to eat each day during his first five days at the prison.
But the prison's governor Fredrik Wallin told Newsbeat in a statement that the prison is in "good condition".