It looked like a post-apocalyptic WAR ZONE when cops arrived to Flavor Flav’s home on the 4th of July … with smoke, loud explosions, and a charged up mob … and the whole thing was caught on tape.

Long story short — Flav and some of his Las Vegas neighbors set off a TON of fireworks in the middle of the street … and not surprisingly, the noise (and the giant fireworks in the sky) attracted the local police.

When cops arrived … they sifted their way through the smoke and located Flav, who was still clutching a lighter in his hand.

Flav was totally cooperative — and forked over his I.D. to the police. The laws regarding fireworks in Vegas are a little loose … but cops didn’t feel like Flav’s situation warranted an arrest.

Instead, cops asked the rapper and his neighbors to stop lighting the fire works and clear out of the street … and everyone seemed to oblige.

We spoke to Flav about the incident, who told us, “We had a good time watching my fireworks show and everything ended safely. Cops came a few times but didn’t arrest me … thank God (and the police)!!”