Terence McKenna, an author, lecturer and counterculture drug guru who believed that eating psychedelic mushrooms could ``empower a sense of community and dissolve boundaries,'' has died after a long battle with brain cancer.

Mr. McKenna, 53, died Monday at a friend's home in San Rafael. A longtime advocate of experimental drug use who updated a popular slogan to become ``log in, turn on, drop out,'' Mr. McKenna believed that psychedelic drugs were the key to human evolution.

In his 1991 book, ``Food of the Gods,'' he proclaimed to a skeptical world that prehistoric human beings developed language, religion and advanced civilizations only after accidentally finding and ingesting psychedelic drugs while gathering food. Warfare, he believed, caught on only after mushrooms became scarce as a result of a world drought.

A native of Paonia, Colo., and a graduate of Los Altos High School and the University of California at Berkeley, Mr. McKenna traveled extensively in Asia, Europe and South America, experimenting with drugs and writing vivid accounts. In one book, ``True Hallucinations,'' he described a 1971 drug trip through the Amazon jungle and an attempt to communicate with his dead mother using the ``manipulative power of consciousness'' to overcome the ``inertia of pre-existing physical laws.''

In later years, he delivered lectures about the end of time, which he believed would occur December 21, 2012, and worked as a live pundit at all-night ``rave'' parties. He was the author of six books on psychedelia and a ``scholar-in-residence'' at the counterculture Esalen Institute on the Big Sur coast.

His role model, 1960s drug guru Timothy Leary, once called Mr. McKenna ``ten times smarter and more effective than I was.''

He is survived by his longtime companion, Christy Silness, of Kona, Hawaii, and by children Klea McKenna of Santa Cruz, California and Finn McKenna of Jersey City, New Jersey. Plans for memorial services in the Bay Area and in New York are pending.