Surveillance video captured the moment a Molotov cocktail ignited in the doorway of Manhattan’s Masonic Lodge, police said Monday.

The footage released by the NYPD shows the suspect throw the “incendiary device” at the building on 24th Street near Sixth Avenue at about 11:45 p.m. on Oct. 8, cops said.

The glass bottle with a flaming wick crashes against the door of the building, shatters, then ignites into flames, according to the footage.

The suspect, wearing a gray sweatshirt and dark track pants, walked away from the scene after the arson and was spotted entering a nearby subway station, police said.

The fire went out soon after it ignited, cops said. Firefighters were called to the scene, but the flames were already extinguished by the time they arrived, authorities said.

The building, which spans an entire city block, has been open since 1873 and is home to a number of Masonic Lodges, according to its website.