(CNN) — It was a legendary celebration.

For a few months in 1967, one neighborhood in San Francisco became the center of the world for busloads of artists, activists, drifters and dreamers.

The rock 'n' roll shows, long hair, mind-altering drugs and free love of that "Summer of Love" in Haight-Ashbury captivated the nation, but the buildup to that season was a serious and thoughtful movement toward a more compassionate America, says historian Dennis McNally

"To sum it up in one sentence, the Summer of Love, which is code for the two or three years before it, represents the most extraordinary challenge to conventional American thinking in the last 100 years," says McNally, the Grateful Dead's longtime publicist.

What led to the Summer of Love?

It's all part of "On the Road to the Summer of Love," a 50th anniversary Summer of Love exhibition curated by McNally at the California Historical Society, which runs through September 24.

With more than 100 photographs by more than 20 photographers, plus recordings, playbills and other memorabilia, the exhibit co-curated by counterculture historian Alisa Leslie seeks to explain what led to that summer in San Francisco.

It covers Allen Ginsberg's debut public reading of "Howl" in 1955; the anti-Vietnam War protests; the birth of the Free Speech movement at the University of California, Berkeley; the avant-garde art scene; the rise of music on cassette tapes; and a number of outdoor music festivals the likes of which the world had never seen.

"What you have is a group of people who start with the beat point of view, which is that everything isn't perfect in America, and there are spiritual needs that are going unmet," says McNally, who has studied the period extensively.

"You add the political reality of various social protests like the Civil Rights movement, and the war in Vietnam, and then you add a lot of new ideas of what art is from the avant-garde scene in San Francisco," he says.

"And then you sort of catalyze it with LSD, which gets people thinking, 'Maybe the world isn't quite what we're being taught.' ... and then you stack it on top of rock 'n' roll, and suddenly you have this idea of an entirely new culture."

20,000 gather for the "Be-In"

The Human Be-In , an unexpectedly popular gathering held January 14, 1967, in Golden Gate Park, became the landmark event of the year.

At least 20,000 authority-questioning young people turned out to hear Beat poets and local rock bands such as Jefferson Airplane and the Grateful Dead. That day, psychologist and LSD advocate Timothy Leary famously urged the audience to "Turn on, tune in, drop out."

A group calling themselves the "Council for the Summer of Love" formed to plan for the hordes of young people they expected from across the country once high schools and colleges let out that year, and that's how the term "Summer of Love" was born.

The photo exhibit is one of several events in San Francisco celebrating the 50th anniversary of that eventful summer, and McNally argues that many of the ideas embraced in 1960s Haight-Ashbury can be found in everyday life in 2017.

"If you do yoga, if you eat organic food, it you are concerned about the environment, if you have any unconventional notions about gender and about sexuality, if you smoke pot, and on and on and on, all of this relates to what happened in the 1960s in San Francisco," McNally says.