Exclusive

President Trump is very much aware of A$AP Rocky's legal sitch in Sweden -- and he's got his team working to get him freed ... thanks in part to Kim K and Kanye West.

That's right ... we've learned Kim and Kanye lobbied The White House to jump in and get involved in the drama across the pond -- where A$AP's been behind bars for more than two weeks now as prosecutors determine if the rapper should be charged with aggravated assault.

Here's how it went down. We're told as soon as Kim and Kanye heard about A$AP's predicament earlier this month ... Kanye urged Kim to get on the horn and talk to Trump's son-in-law, Jared Kushner -- with whom Kim is very familiar from her previous White House work.

Our sources say Kim filled Jared in on what was happening, and Jared then took the info to Trump himself ... whom, we're told, acknowledged something seemed amiss.

In addition to Kim and Kanye, Kareem Lanier and Pastor Darrell Scott of the White House’s Urban Revitalization Coalition, also played a big role … helping to connect ASAP’s management directly with Kushner through a phone call.

We're told Trump told Kushner he believed A$AP was being held unfairly, and wanted to help. As we reported, Secretary of State Mike Pompeo got involved and unleashed a few deputies in an attempt to get some action. A State Dept. member was supposed to arrive in Sweden Thursday. We're told the State Dept. is now actively working to get A$AP out of jail, thanks in large part to Kim's efforts.

Play video content TMZ.com

However, some feel the State Dept. isn't moving fast enough. Members of the Congressional Black Caucus called Pompeo out for not doing more, though our sources say he's been working tirelessly. Fact is ... Swedish authorities have been unmoved so far ... and our sources say there's now real fear prosecutors might delay their decision beyond the 3 week mark and keep A$AP in custody.