The existence of gays and lesbians was no great mystery to Anthony Friedkin when he was a teenager in West Los Angeles during the 1960s. Gay friends of his mother, a dancer who had worked on Broadway, frequently visited the house, and his progressive-minded father was a top-shelf writer for film and television, one who successfully fought to feature Bill Cosby in the pathbreaking NBC show "I Spy."

But even considering that upbringing, it's hard to account for Friedkin's prescience when, as a 19-year-old photographer, he set out to document the emerging gay and lesbian community in Los Angeles in the wake of New York City's 1969 Stonewall Riots, which catalyzed the gay rights movement.

Friedkin's self-assigned project, which he came to call "The Gay Essay," unfolded over the course of three years, and eventually brought him to San Francisco, in the fall of 1972, where he documented the seminal gender-bending satirists known as the Cockettes, who were on the brink of breaking up after a disastrous run in New York City.

Intimate, coolly inquisitive and beautifully printed by Friedkin, "The Gay Essay" made its debut at a small West Los Angeles gallery in 1973 and won immediate recognition as a landmark of documentary photography.

Now San Francisco's de Young Museum is presenting "Anthony Friedkin: The Gay Essay" representing the entire scope of the photographer's project for the first time. The exhibit, opening June 14, includes more than 75 prints, plus documents and archival materials that supply context for the images, which will remain on view through Jan. 11, 2015. The exhibition coincides with the San Francisco Pride celebration June 28-29 and the 45th anniversary of the Stonewall Riots on June 28.

Some four decades later, Friedkin's accomplishment in "The Gay Essay" seems all the more remarkable for the fact that he could never claim insider status. "My father was in the film industry, and my mother was a dancer, and as a child I was introduced to gay and lesbian couples," he says. "I think there's something beautiful that a straight guy would want to do those pictures."

Talking on the phone with Friedkin at his home in Santa Monica -- he lives near the beach to keep up with surfing, his other passion besides photography -- one can easily understand how he gained the trust of people who were still subject to police harassment, employment discrimination and random street violence just for walking hand in hand. Garrulous, ardent and endearingly unguarded, he can still sound like a teenager eager for creative adventures.

But Friedkin brought more than a willing spirit to "The Gay Essay." He had a rigorously trained mind. Precociously accomplished as a photographer, who started working in the dark room to develop his own prints at age 11, Friedkin was encouraged by his father to delve deeply into any topic that interested him. By his late teens, he was self-possessed and determined to make his mark.

Immersed in the rapidly evolving dialogue over photography's role in the world, he absorbed Cornell Capa's humanist manifesto "The Concerned Photographer," studied Cartier-Bresson's "The Decisive Moment" and reveled in Robert Frank's "The Americans," which Friedkin says "brought the blues to photography."

"I was addicted," Friedkin says. "I was in the mix. Even at 19 I was educated as to what had happened before me, and I thought photography was a great medium for giving us a sense of who we are."

He doesn't remember precisely how or why he decided to start documenting L.A.'s gay community. After graduating from high school, he spent a summer traveling around Western Europe with some friends in a Volkswagen microbus, and by the time he came home he was ready to start "The Gay Essay."

He captured many of his most arresting images through hanging around foundational gay organizations such as the Gay Liberation Front's Survival Committee and the Rev. Troy Perry's Metropolitan Community Church. He was on the scene in 1970 to shoot the first Christopher Street West Parade in West Hollywood (so named because the Stonewall Inn was on Christopher Street in Greenwich Village).

"More than anything, I just jumped off a cliff," Friedkin says. "I knew it was going to be challenging, that I was going to be put through different experiences, and I would grow a lot as a person. At 19, you're still discovering everything about yourself. I was excited about the possibilities of learning new things, meeting new people."

His sense of mission was driven by his creative ambition.

Shooting with a small, lightweight M4 35mm Leica, he worked without a flash, and his images feel skin-close without an exploitative edge. Obsessive in the darkroom, he worked doggedly to perfect his printmaking, eventually giving his silky black-and-white prints infinitesimal textural nuances.

"My priority was to be a fine-art photographer," Friedkin says. "I wanted to create an extraordinary set of photographs. I wanted them to be memorable and beautiful."

Published by Yale University Press, the exhibition catalog includes an incisive essay by Julian Cox, the Founding Curator of Photography for the Fine Arts Museums of San Francisco and Chief Curator at the de Young Museum. Cox has been a champion of Friedkin's work since he acquired several dozen prints for the J. Paul Getty Museum in Los Angeles a decade ago. He writes that, for Friedkin, "the search for truth was imperative, as was his commitment to a self-assigned form of reporting that tackled social issues from an experimental point of view."

According to Friedkin, it wasn't the cutting-edge nature of his work that kept "The Gay Essay" from having been previously published in the United States. In the mid-1970s he tried to get several editors interested in the book, but never found any takers. Over the years, while creating numerous photo essays and supporting himself as a still photographer for films, he kept "The Gay Essay" in the back of his mind.

"I always wanted to do a book," he says. "I knew how I wanted it to be sequenced, the melody you create when you turn the pages. When you photograph somebody, you can capture their spirit -- not all of it, but some of it. I'm especially proud of the portraits, the way I framed them. I wanted to be good. Like a young guitar player, I wanted to be hot. I wanted to create a breakthrough set of pictures."

Contact Andrew Gilbert at jazzscribe@aol.com.

'Anthony Friedkin: The Gay Essay'
When: June 14- Jan. 11, 2015; 9:30 a.m.-5:15 p.m. Tuesdays-Sundays, until 8 p.m. Thursdays
Where: De Young Museum, Golden Gate Park, San Francisco
Admission: $6-$10; 415-750-3600, deyoung.famsf.org