Exclusive

Tekashi 6ix9ine has at least one legal woe off his plate -- his mall attack case out of Houston has been tossed out ... and the reasons for doing so are interesting.

The State of Texas formally requested to have Tekashi's assault charges stemming from an alleged 2018 altercation completely dismissed, and a judge signed off on it Monday.

As for why it got tossed -- first, the state says the complaining witness -- or the alleged victim in this case -- requested it be so ... which we already knew. The kid who allegedly got choked out by Tekashi later showed up to one of the rapper's court hearings in the matter and posed with him.

You'll recall ... the whole thing started over the kid, Santiago Albarran, recording Tekashi against his wishes, which allegedly resulted in Tekashi putting his hands around SA's throat.

At the hearing, Santiago told Tekashi's attorney that he wanted to drop the charges, and also apparently said he'd expressed that to the prosecution too. Looks like they listened.

Tekashi's attorney, Carl A. Moore, tells TMZ, "“Mr. Hernandez has not been notified yet of the dismissal. We plan to notify him today. I am happy the prosecutors handling this case did what was fair and just today in Dismissing the charge against Mr. Hernandez. We hope that getting this case behind him will assist in him moving forward with his career.”

There's one more reason the state cited for wanting the case dismissed ... prosecutors say moving Tekashi to Texas is a "security risk" now that he's cooperated with the feds in NYC. Of course, they're referring to Tekashi69's snitching ... in which he testified against alleged former associates.