(CNN) - One of the tactics used by the United States government in an attempt to advocate for A$AP Rocky? A diplomatic letter warning of "negative consequences" in US-Swedish relations, if the American rapper's hearing on assault charges was not resolved quickly.
CNN has obtained the full text of a letter written by the US Special Presidential Envoy for Hostage Affairs Robert C. O'Brien and leaked earlier on Twitter. Addressed to the Swedish Prosecution Authority on July 31 -- before the rapper's trial had concluded -- the letter said the US was eager "to resolve this case as soon as possible to avoid potentially negative consequences to the US-Swedish bilateral relationship."
Sweden's Prosecutor-General, Petra Lindh, responded in a letter on August 1, 2019, defending the independence of the prosecutor and the Swedish court. "No other prosecutor, not even I, may interfere with a specific case or try to affect the prosecutor responsible," wrote Lindh.
"Furthermore, when a person is charged and the case is brought before a court, only the court can decide, during or after the trial, whether or not to release the person or decide on supervised detention."
A US Department of State official told CNN, "We can't comment on diplomatic communications."
The 30-year-old A$AP Rocky -- whose real name is Rakim Mayers -- was embroiled in a street brawl in Stockholm in June, and he has argued that he and his co-defendants only acted in self-defense.
His trial concluded today with his release from jail, and a final judgement in the case will be delivered in August. In the meantime, US officials say he is already on his way back to the United States.
The case has captured the attention of US president Donald Trump, who publicly demanded the rapper's release and raised the issue with the Swedish Prime Minister Stefan Löfven. Swedish authorities have repeatedly stressed that the country's judiciary is independent and that the government is "not allowed, and will not attempt, to influence the legal proceedings."
Upon Rocky's release on Friday, Trump celebrated, tweeting "A$AP Rocky released from prison and on his way home to the United States from Sweden. It was a Rocky Week, get home ASAP A$AP!"
Journalist Per Nyberg reported from Stockholm, and CNN's Scott Reeves wrote from Atlanta. CNN's Kylie Atwood in Washington contributed to this report.