A Queens man wanted for allegedly torching a cop car had spray-painted “TOO LATE!” on his wall to taunt the feds — but he didn’t flee fast enough and FBI agents nabbed him anyway, Brooklyn prosecutors said.

Sam Resto was busted at his work Thursday afternoon with a passport in his backpack, and admitted to FBI agents he had planned to flee, prosecutors said.

TRUMP SAYS NYC WAS 'SO GOOD' BEFORE HE LEFT, NOT SO MUCH ANYMORE

When agents entered his Elmhurst apartment that night, they were confronted with the scrawled taunt, alongside a drawing of a smiley face with a tongue sticking out.

The provocation backfired.

Prosecutors asked a Brooklyn federal court Friday to order Resto held without bail — and used his intention to flee and the wall taunt to back up their argument that he’s a flight risk.

The judge agreed and ordered Resto held.

In a detention memo, prosecutors wrote that agents had been surveilling Resto on July 29 when he took a rideshare from his home to the Upper West Side, carrying a red can of gasoline.

At 3:50 a.m. Resto, wearing a Guy Fawkes mask, allegedly smashed in the window of an NYPD Ford Fusion parked at West 83rd Street near Columbus Avenue, doused the inside with gas and set it aflame, the papers say.

Assistant US Attorney Michael Keilty wrote in the memo that Resto’s alleged criminal conduct had escalated “posing a severe and ongoing risk to the community.”

CLICK HERE FOR THE FOX NEWS APP 

He was arrested July 10 for swinging a chain at another person in a dispute over a parking spot. Five days later he was busted on the Brooklyn Bridge for obstructing traffic during a demonstration.

During a search of his apartment, agents found “The Anarchist’s Cookbook” which includes instructions for making explosives.