Well this is a twist ... Donald Trump just said he's personally guaranteeing bail for A$AP Rocky if Swedish authorities release him ... meaning the President would be on the hook if Rocky skips out.

It's a bizarre turn in the case. Trump just tweeted, "Just had a very good call with @SwedishPM Stefan Lofven who 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 ..."

Trump didn't use the word, but it sounds like he's saying he's willing to become a guarantor on Rocky's bail application.

As we reported, a judge ruled Friday A$AP is a flight risk and therefore can't be let out of jail while the case grinds on.

So, he's now spoken to the Swedish Prime Minister who really promised nothing ... especially if he views what's going on as fair. As we reported, A$AP has been jailed for more than 2 weeks and not a single criminal charge has been filed against him. Prosecutors say they need another week to investigate -- even though any lawyer out of school for a year could process this one quickly, since there's video -- and they convinced a judge to hold Rocky in custody while they figure it out.

And, by the way, prosecutors blew it by sending out a press release saying they plan to indict him ... so why the charade of pretending the investigation is continuing? When we contacted them they told us they mistakenly put that info in the press release and then removed it. The mistake was clearly just that they played their hand.

The reality is this ... Trump and his State Dept. have already made a full court press to get Rocky out and it fell on deaf ears. Good that he's trying, but Swedish authorities up to this point have been immovable.

As we reported, Kanye called Trump Friday and made a plea for the President to get involved.