Bernhard Goetz, the man who was dubbed the “subway vigilante” when he shot four youths who he said were threatening him on the subway in 1984 was busted Friday evening for selling $30 worth of pot to an undercover female cop.

Goetz, 65, met the undercover on the street, chatted her up and walked with her back to his apartment, where he went upstairs to get the weed. Goetz was arrested at 15th Street and Fifth Avenue near his Union Square pad at about 5:45 p.m., police sources 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,” doorman John D’Antonia told the New York Post.