LOS ANGELES — When P.F. Sloan was 19 and living with his parents, he wrote five songs in one night, ending at 4 a.m. with “Eve of Destruction,” a Dylanesque lament that Barry McGuire took to the top of the charts in 1965.

“Eve of Destruction” was a bleak, angry look at what a bloody mess the world had become. Seen as inflammatory, the song was banned by some radio stations. But it remained in the top 20 in the U.S. for two months.

It also was credited with boosting momentum for passage of the 26th Amendment.

Signed into law in 1971, the measure lowered the voting age from 21 to 18. Supporters rallied around Sloan’s lines:

“You’re old enough to kill but not for votin’ You don’t believe in war but what’s that gun you’re totin’?

Sloan, who sold his first song at 13 and whose hits included Johnny Rivers’ “Secret Agent Man” as well as songs recorded by the Turtles, Herman’s Hermits, the 5th Dimension, and the Mamas & the Papas, died Sunday at his home in Los Angeles. He was 70.

He had pancreatic cancer, his publicists said.

A few years after he became famous for his protest anthem, Sloan dropped from view. For decades, he suffered from severe depression. He was hospitalized and claimed he had been given “lobotomy pills.” Whole years disappeared from his memory.

But there was a flip side: “The only good thing about it was that I missed the whole disco era,” he jokingly said.

Born in New York City on Sept. 18, 1945, Phillip Gary Schlein was raised on Long Island and later in Los Angeles. His father, a pharmacist, changed his name to Sloan to avoid anti-Semitism