A Brooklyn man is under arrest after he allegedly tried to set fire to a subway booth during a failed robbery attempt in Crown Heights Friday night.

Everette Robinson, 51, of St. Mark’s Avenue, allegedly doused the teller’s booth on the No. 3 line at Nostrand Avenue with gasoline through the small opening under the glass and demanded money.

“He said that if I didn’t give him the money, he would light me up,” MTA worker Percillia Augustine-Soverall, 44, told the Daily News.

She told the paper that the man then lit a rag or T-shirt soaked in gasoline, apparently intending to ignite the booth with it.

An automated system designed to detect hazardous materials prevented it, covering the booth in an inflammable white foam. A passerby knocked the flaming rag out of the man’s hands, prompting him to flee.

“The system came on and then the whole booth was like, all you see is white,” Augustine-Soverall reportedly said. “Everything was just cloudy in the booth. I couldn’t do anything. ... I just started crying, I was in shock.”

A similar attack in 1995 left an MTA worker with fatal injuries.