Slobodan Jovicic, his lawyer, said that he did not know whether the rapper would appeal the verdict. “The question is whether he’ll have the energy and stamina to do this one more time given all the circus around it,” he added.

Much of the discussion in the trial centered on whether a bottle was used in the assault. Mr. Jafari said he had been hit on the side of the head with one, but was unable to say by whom. Rocky admitted picking up a bottle shortly before the fight, but said he put it back down shortly afterward because he “realized it was stupid.”

“The prosecutor has not been able to prove that the victim was struck in the back of the head with a bottle or that he was in any other way assaulted with bottles,” Judge Lennerbrant said in a news release. “This has affected the assessment of the seriousness of the crime,” he added.

Rocky and his two co-defendants served almost a month in detention in Sweden after they were arrested. Seen as flight risks, they were kept in the detention center from July 5 until the trial ended on Aug. 2.

Mr. Trump became a close watcher of the case after the rap superstar Kanye West asked his wife, Ms. Kardashian West, to seek White House help in winning Rocky’s release from jail.