David Peel, a longtime New York street musician whose song “I Like Marijuana” became a hippie anthem in the 1960s, and who collaborated with John Lennon and Yoko Ono in the early ’70s, died on Thursday in Manhattan. He was 74.

The cause was complications of a heart attack, said Joff Wilson, a friend who performed with Mr. Peel’s band, the Lower East Side.

Mr. Peel, an anarchist and marijuana evangelist, began performing in Washington Square Park in the late 1960s. He was equipped with three guitar chords, a screaming vocal style and an endless stream of punchy, provocative lyrics aimed at the Establishment in all its forms.

Danny Fields of Elektra Records, who later signed the Stooges and the Ramones, heard Mr. Peel and signed him to the label. Mr. Peel was recorded live in the park with a portable tape machine, singing “I Like Marijuana,” “Here Comes a Cop,” “Up Against the Wall” and other songs released in 1968 on the album “Have a Marijuana.”