The rapper is facing legal trouble in Sweden following his alleged involvement in a street altercation

The source tells PEOPLE that Kardashian West recently reached out to the president’s son-in-law and senior adviser, Jared Kushner. West was also involved but she was the one to make the outreach to the administration.

Get push notifications with news, features and more.

“She really brought it to the forefront,” the source says. Kardashian West had developed a relationship with Kushner due to her previous work with the White House on criminal justice reform.

According to the source, Kushner then brought it to the president, who agreed that “something just needed to be checked to make sure things were appropriate.” (A White House spokesman did not respond to a message about the case.)

Trump contacted Secretary of State Mike Pompeo, who has been “working tirelessly to make sure that this case is resolved in the most appropriate and fair way for an American citizen,” the source says. Rocky’s team has also been in contact with the White House, giving periodic updates and making requests.

The president later told reporters, of Rocky, “Many, many members of the African-American community have called me, friends of mine, and said ‘Can you help?’ ” Trump tweeted that he spoke with West about the matter and said First Lady Melania Trump had also brought it to his attention.

“We’ll be working with the State Department and we hope to get him home soon,” Mrs. Trump told reporters.

Image zoom Axelle/Bauer-Griffin/FilmMagic/Getty Images

The 30-year-old rapper, né Rakim Mayers, was arrested in Stockholm on July 2 for suspected assault, along with three others who were involved in the incident. On July 5, a spokesperson from the Stockholm Prosecutor’s Office told PEOPLE that A$AP Rocky would be detained for two weeks while “the prosecutor can gather evidence and look into the case a little further.”

Last Tuesday, a source told PEOPLE that the Swedish jail where A$AP Rocky is being held is “inhumane” and “horrific.” TMZ first reported the news.

“The conditions of the facility are horrific,” the source said. “Some of the inhumane conditions Rocky and his colleagues are facing at the Stockholm Detention Center include 24/7 solitary confinement, restriction of amenities for the most basic of human functions, access to palatable and life-sustaining food as well as unsanitary conditions.”

“Rocky is now being detained for an unknown period of time until they have a trial and he is having his legal and basic human rights ignored while being forced to live in inhumane conditions — all for acting in self-defense,” the source alleged.

Fredrik Wallin, the governor of the prison where A$AP Rocky is being held, refuted the description of the facility put forth in the TMZ report.

“The Swedish Prison and Probation Service has a policy not to comment on individual cases or prisoners,” Wallin told PEOPLE. “However, we can refute the picture of prison Kronoberg which is described in the article in TMZ. To exemplify, prison staff and prisoners drink the same municipal tap water.”

Image zoom Victor Boyko/Getty

Additionally, a State Department spokeswoman told PEOPLE that “we are aware of the arrest of a U.S. citizen in Stockholm. We take seriously our responsibility to assist U.S. citizens abroad and are actively monitoring the situation. Due to privacy considerations, we have no further comment at this time.”

A$AP Rocky appeared in Stockholm District Court with his lawyer on July 5, where the judge ruled on the two-week investigation — though the rapper could be detained even longer if prosecutors need more time.

“It depends on whether the investigation is completed or not,” the spokesperson told PEOPLE. “If the investigation is finished and the prosecutor chooses to indict, then they will do that. But if the investigation is not completed by then — which is fairly likely given that two weeks is a relatively short time — the prosecutor will request that he is detained for a further two weeks. It is then for the court to decide.”

The rapper’s lawyer Henrik Olsson Lilja told PEOPLE, “The prosecutor told us today [July 5] that he will not probably be finished within two weeks, so my assumption is that he will have completed the investigation within around three-four weeks.”

“We appealed the District Court’s decision today, but the Court of Appeal rejected that,” he added. “Now we will probably appeal to the Supreme Court, but they will not be able to try this until next week, probably.”