The stakes are not only high for A$AP Rocky[1] in his Swedish assault case ... the European nation itself could be forced to pay UNTOLD MILLIONS if he's ultimately cleared.

There's something we found about Swedish law that ups the stakes dramatically ... if someone is charged with a crime and is found not guilty, the country could be on the hook for all the money the victorious defendant lost as a result of incarceration and the trial.

In A$AP's case ... that's a fortune. He's already been in jail for going on 3 weeks[2] and it's all but certain he'll be formally charged Thursday with aggravated assault. The chances of getting sprung from jail once he's charged are slim to none, because Sweden considers him a flight risk[3].

By the time he goes to trial, months may have passed, and that means a bunch of scheduled concert dates will go down the tubes.

He's already had to cancel[4] 12 shows and is booked for 7 more through the month of September.

It's unclear exactly how much Rocky gets paid for each gig -- but between 2014 and 2017, reported booking fees from each concert range from $80k to $120k. It's 2019, so let's just say his flat quote these days is north of $100k.

The longer he sits in jail, the more the stakes go up ... $2 mil, and maybe a lot more.

Here's the rub. The law says the country "may" be forced to pay a victorious defendant. They don't define "may," but if history is any lesson, Sweden doesn't want to

Read more from our friends at TMZ