EXCLUSIVE

Tekashi69's Brooklyn home was swarmed and raided by federal agents Friday ... a search we're told turned up a gun.

Law enforcement sources tell TMZ Tekashi was not home during the time of the raid. It's currently unknown what prompted the search, or who the gun discovered in the home belonged to.

A source close to Tekashi tells us the rapper was already in the process of moving out of the Brooklyn home that was raided. We're told 6ix9ine had not been in the house for several weeks, and many people -- including movers and cleaners -- have been inside the property lately.

Tekashi hasn't been in NY much over the last several weeks. You'll remember ... he was in Colombia with Kanye West, and had a show in Russia where a fan got stomped out by his crew.

You can see from the pics, multiple agents showed up at the home for the search. We're told NYPD also assisted.