He was 30, and he’d spent the three previous years — in his words — “constantly very, very broke,” reading Jorge Luis Borges, watching French New Wave films and meticulously crafting his surrealist collection of photographs at a time when art photography was not a viable commercial endeavor. 

Nonetheless, it was the beginning of a long and successful career.

“It was very strange,” Mr. Gibson said. “I went from an impoverished nobody to all of a sudden being on my feet. I was getting a lot of press, doing lectures and workshops, and selling the occasional print.”

Under the banner of his newly established imprint, Lustrum Press, Mr. Gibson released two more related books, “Deja-Vu” (1973), and “Days at Sea” (1974), which, with “The Somnambulist,” came to be known as the photographer’s “Black Trilogy.” Last month, decades since they were last in print, the University of Texas Press and Editions Hazan published them in a single volume, “The Black Trilogy.”

“I wanted to have enough recognition to be able to do my work,” Mr. Gibson said. “I feel I’ve gotten all the recognition I deserve, no more, no less. Since I was 30 years old, nothing has stood between me and anything I wanted to do.”

Mr. Gibson was born in Los Angeles, and left high school at 16 to join the Navy. On his first day at boot camp, he was randomly selected to attend the Naval School of Photography in Pensacola, Fla. “I consider photography to have been my destiny,” he said. “I didn’t choose it; it chose me.”

He moved to California in 1960 and became an assistant to Dorothea Lange. After some initial success as a magazine photographer, he moved to New York City in 1966, where he worked briefly with the Magnum Agency and as an assistant to Robert Frank. But by 27, he knew he wasn’t interested in a career in photojournalism.

“I wanted to make photographs you could look at for a long period of time, photographs that were not ephemera, photographs that were made to last and could support a great depth of content,” he said. “That’s the opposite of working for the media.”

At the time, Mr. Gibson slept during the day, staying up nights and expanding his mind through books and films, which gave him “a different relationship to reality.” On a weekend trip with friends in Pennsylvania, that newfound perspective surfaced in his photos, though he didn’t quite know how to interpret it. But when he went to Mexico with Mr. Frank and his family, he returned to New York with an understanding of the photos he’d taken in Pennsylvania.

“It occurred to me that my camera as an instrument had located a dream reality,” he said.

Those images — including the photo that  appears on the cover of “The Black Trilogy,” of a disembodied hand hovering over a doorknob — were among the first entries in what became “The Somnambulist,” a book whose title refers to sleepwalking, and whose contents are billed in Mr. Gibson’s introduction as a “dream sequence.” In keeping with that philosophy, Mr. Gibson pursued new images for the book as passively as a dreamer experiences a dream, keeping his camera by his side at all times and waiting for the right images to present themselves.

One such image appeared while Mr. Gibson was walking down Sixth Avenue, when he saw a beauty parlor engulfed in flames. That scene could have been plucked from his subconscious: His mother, who died in a fire, had owned and operated a beauty parlor. Many of the other images in the book are abstract, others are erotic, most are shadowy and mysterious. As in a dream, the characters, settings and objects depicted seem to connect through some phantasmagorical logic.

“I believe photographs are better than the photographer and the art is better than the artist,” he said. “I’m not the music; I’m the radio through which the music plays. So I follow the work, I don’t lead the work. I go where the work sends me.”