EXCLUSIVE

Lil Xan can claim he pulled a gun on a stranger in self-defense, but right now cops are looking at the incident as a possible case of assault with a deadly weapon.

Law enforcement sources tell TMZ ... LAPD's elite Robbery-Homicide Division has taken over the investigation which could lead to a very serious felony. We're told when the alleged victim first went to police over his Friday night run-in with the rapper -- captured on video obtained by TMZ -- the officer filed a report for assault with a deadly weapon.

Play video content TMZ.com

Although, Xan never fired ... it rises to assault with a deadly weapon if the alleged victim feared he might be shot.

In addition to cops seeing the video we posted, our sources say detectives are also looking to pull video from nearby businesses and high-rise residential buildings. There's also a restaurant across the street that may have surveillance vid of the full encounter. That could provide more context beyond our video, which starts when the argument is already in full swing.

We're told detectives want to speak with Lil Xan to get his side of the story. After that, cops could present their case to the D.A.'s Office ... OR get a warrant to arrest him.

TMZ broke the story ... the alleged victim called out Xan for calling Tupac's music "boring" last year. Things quickly escalated ... with Xan pulling a gun out multiple times, and pointing it at the man.

The 22-year-old rapper said he only pulled the gun because he thought he was about to be attacked.