The Swedish prime minister, Stefan Lofven, told President Trump in a phone call on Saturday that the rapper ASAP Rocky, who has been detained in Sweden on an assault charge, will not get any special treatment, according to a statement from the Swedish government.

Mr. Trump had sought Rocky’s release after being pressed by American celebrities, including the rapper Kanye West.

Toni Eriksson, Mr. Lofven’s press secretary, said in a statement that the phone call lasted about 20 minutes and was “friendly and respectful.”

Mr. Lofven “underlined that in Sweden everyone is equal before the law and that the government cannot and will not attempt to influence the legal proceedings,” the statement said.