Pop star Justin Bieber thanked U.S. President Donald Trump for trying to help rapper A$AP Rocky, who’s currently being held by Swedish police. At the same time, he also made sure to criticize the president and the fallout of his “zero-tolerance” immigration policy.

Bieber took to Twitter to applaud Trump’s efforts to lobby Swedish authorities on behalf of the rapper but also referred to the ongoing crisis at the U.S.-Mexico border, where migrant children are being held in detention centers.

"I want my friend out," Bieber tweeted Saturday. "I appreciate you trying to help him. But while (you're) at it, @realDonaldTrump can you also let those kids out of cages?"

Trump’s zero-tolerance policy is such that any migrant parents found illegally crossing into the United States are separated from their children. The policy was designed in an effort to deter illegal immigration from Central American countries where residents are fleeing crime and violence.

Democratic lawmakers have decried the crowded conditions at the U.S. detention centres, including the lack of access to basic items such as soap, toothbrushes and blankets.

A vocal group of U.S. congresswomen known as “The Squad,” made up of Alexandria Ocasio-Cortez of New York, Ilhan Omar of Minnesota, Ayanna Pressley of Massachusetts and Rashida Tlaib of Michigan, have said detained migrants told them some of them have been drinking water out of toilets.

By Sunday morning, Trump hadn’t responded to Bieber but had tweeted that he’d spoken to Swedish Prime Minister Stefan Löfven to discuss the case of rapper A$AP Rocky, whose real name is Rakim Mayer.

The U.S. president tweeted that the Swedish leader had “assured me that American citizen A$AP Rocky will be treated fairly. Likewise, I assured him that A$AP was not a flight risk and offered to personally vouch for his bail, or an alternative."

Other celebrities including fellow Canadian pop star Shawn Mendes, Nicki Minaj, Post Malone and Kim Kardashian have also spoken on A$AP Rocky’s behalf. The musician was detained on July 3 on accusations of assault after he was allegedly involved in a confrontation in Stockholm shortly before appearing at a music festival.