Justin Bieber has responded to Donald Trump declaring he would work to free A$AP Rocky by suggesting that the US president also try to free detained migrant children.

Following a conversation with Kanye West, Trump announced that he would try to free the rapper from custody in Sweden.

A$AP, real name Rakim Mayers, was detained following a fight with two men who he claims wouldn't stop following him, and harassing his entourage.

Mr Trump declared on Twitter that he would make efforts to have Mayers released. "Just spoke to @KanyeWest about his friend A AP Rocky's incarceration," he stated.

"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!"

Weighing into the debate, Bieber tweeted: "I want my friend out . . . I appreciate you trying to help him.

"But while your at it @realDonaldTrump can you also let those kids out of cages?"

The pop star referenced the ongoing situation on the southern border of the US, where the treatment of children by immigration officials has come under scrutiny.