Bernhard Goetz — the infamous "subway vigilante" who became part of New York City lore when he shot four youths who he said were threatening him on the subway in 1984 — was busted Friday evening for peddling $30 worth of pot to an undercover female cop, The Post has learned.

Goetz was arrested at 15th Street and Fifth Avenue near his Union Square pad at about 5:45 p.m., police sources said.

"He told her he wanted to get high with her and sold her a small amount of pot in a -tissue," a source said.

Goetz, 65, met the undercover on the street, chatted her up and walked with her back to his apartment, where he went upstairs to allegedly get the weed. When he came downstairs to allegedly give her the pot, he was arrested, the source said.

New Yorkers who live and work near the scene of the crime couldn’t believe Goetz had been busted for pot.

"Bernie? Oh, come on, they arrested him for that? It's just pot, they should let him go," said doorman John D’Antonia, 71, who works in a building near Goetz's.

Click for more from