Exclusive

A$AP Rocky says race is not an issue in his detention, TMZ has learned ... but the reality is, he has to say that.

There's certainly plenty of smoke ... as we reported, G-Eazy -- a white rapper -- was arrested in Sweden for assault and cocaine possession, yet he only spent a day-and-a-half in jail, pled guilty, coughed up $9k and he was on his merry way.

A$AP's been in jail going on 3 weeks and he hasn't even been charged, and when that happens it will only be for aggravated assault ... an assault that was provoked by the alleged victim.

That said, our A$AP sources say he has made it clear to all in contact with him ... he doesn't think he's being held because he's black. That's consistently been his story.

Here's the reality ... if A$AP or his team DARED suggest he's being held because he's a black rapper, there would be hell to pay with the prosecutor and probably the judge as well. We've spoken with Swedish Embassy and other officials, and they're all adamant ... they do not discriminate. If foreigners suggested otherwise in court, our sources say it would be a disaster.

We're told A$AP will be charged and will then face 6 years in prison. The best defense they got is provocation by the alleged victim.

One thing's clear by now ... all the work the State Dept. and President have done trying to lobby Swedish officials hasn't worked ... in fact, it may have been counterproductive because prosecutors may not like what they consider intermeddling, and the Prime Minister is siding with them.