TEKASHI 6IX9INE MIGHT FACE LIFE IN PRISON

Tekashi69 was scared outta his mind after a shooting on the set of his music video … but it had nothing to do with getting hit by bullets and everything to do with legal ramifications.

TMZ’s obtained footage taken moments after 2 gunmen opened fire on the Beverly Hills mansion last November where Tekashi and Kanye West were set to film a music video. It’s hard to see, but pay close attention to what you hear — Tekashi desperately wanting to leave … fearing his mere presence at the scene would put his then-newfound freedom in serious jeopardy.

You hear cops explain they found a 9mm and rifle rounds in the alley. They also explain how the house was intentionally targeted before saying they need to ID everyone. That’s when you hear Tekashi — sitting inside an SUV — say, “ID me? I can’t … I’m on probation … tell [the cops] I’m not here.”

Tekashi’s handler is also heard assuring Tekashi, word will NOT get out he was there. Remember … the shooting went down just 2 weeks AFTER the rapper caught a huge break, when he was sentenced to 4 years probation in his child sex case.

As part of the deal, Tekashi was ordered to avoid all gang activity. The shooting, coupled with Tekashi at the scene, was a terrible look.

As it turned out, Tekashi’s real problems started 9 days after the shooting … when he was arrested by the feds on racketeering charges. He now faces life in prison.