An LAPD station got firebombed by someone who threw a Molotov cocktail at its doors ... but it was all captured on video, and cops already nabbed the suspect.
The frightening scene went down around 1 AM Sunday at LAPD's Topanga Division Station and was caught on surveillance footage.
As you can see, the guy walks up with what appears to be an already-lit explosive device in his hand and hurls it at the front of the building, then takes off running.
Law enforcement sources tell TMZ ... the Molotov cocktail cracked the station window but did not break it, and the explosion looked bigger on video than it actually was.
We're told the suspect -- later ID'd as Jonathon Rosin -- was chased down by officers and arrested. He's been booked for igniting an explosive, a felony, and is still in custody.
Cops say Rosin might be homeless and did not explain why he did what he did. Our sources say nobody suffered injuries and it seems the damage is just the cracked window.