Driving across the country in a used Ford in the mid-1950s, Swiss-born photographer Robert Frank used his outsider’s view to produce what many consider the most striking and revealing collection of images of postwar America.

Other photographers were focusing on the optimism and prosperity of the 1950s, but Mr. Frank gazed through the unblinking eye of his Leica and saw a much bleaker prospect. Bedazzled but also troubled by his adopted country, he revealed a nation beset by despair and nagging inequality.

The resulting book, “The Americans,” published in this country in 1959, inspired generations of photographers, writers, filmmakers and musicians and made Mr. Frank one of the most important visual artists of the 20th century.

He died at 94 on Sept. 9 at a hospital in Inverness, Nova Scotia. Kaelan Kleber, the associate director of Pace/MacGill Gallery in Manhattan, which represents Mr. Frank, confirmed his death but did not cite a specific cause.

“The Americans” was, in effect, a group portrait of the nation, honest and stark and not always flattering. Out of 27,000 images that Mr. Frank took during an almost year-long cross-country journey, only 83 stark black-and-white pictures appeared in the book.

His images of lonely people, lonesome roads and smoldering tensions of urban life were a riposte to the honey-hued picture essays of popular magazines of the time such as the Saturday Evening Post and Life.

“The Americans” was often considered a visual complement to Jack Kerouac’s classic Beat Generation novel from 1957, “On the Road.” Kerouac fashioned a memorable introduction to “The Americans,” writing, “With one hand he sucked a sad poem of America onto film, taking rank among the tragic poets of the world.’’

Mr. Frank, who had an aversion to repeating himself, would later turn to filmmaking, collage and other forms of visual art, but with each passing year “The Americans” seemed to grow in stature and influence.

“You know where you were when John F. Kennedy was shot? I know where I was when I saw ‘The Americans,’ ” pop artist Ed Ruscha told the New York Times in 2015. “I was aware of [photographer] Walker Evans’s work. But I felt like those were still lives. Robert’s work was life in motion.”

Bruce Springsteen said he leafed through copies of “The Americans” to stimulate ideas while writing songs. Mr. Frank’s gritty, irregularly cropped images — seemingly shot from the hip or on the run — became the model for a generation of photographers such as Lee Friedlander, Nan Goldin and Garry Winogrand.

In “The Americans,” Mr. Frank used his gift for “street photography” to portray archetypal figures such as hitchhikers, factory workers, prostitutes, cross-dressers walking on New York streets and African American men at a South Carolina funeral.

Two of his masterworks, “Political Rally — Chicago” and “Trolley — New Orleans,” crystallized the themes of alienation and isolation that Mr. Frank saw lurking beneath the prosperous image of 1950s America.

“I was tired of romanticism,” he said nearly 60 years later. “I wanted to present what I saw, pure and simple.”

“Political Rally,” taken at the 1956 Democratic National Convention, depicts a faceless tuba player standing detached from the half-seen people next to him. In “Trolley,” Mr. Frank captures the indignity of racism by showing black and white passengers occupying side-by-side window frames of the trolley car yet divided by race and social status.

Mr. Frank was particularly drawn to the African American experience at a time when much of the country was still segregated. While driving in Arkansas in November 1955, he was stopped by police officers. Noticing that he spoke with a foreign accent and had a bottle of Hennessy cognac in his glove box, the officers asked Mr. Frank if he was a “commie.” He spent several hours in the local jail.

“That trip I got to like black people so much more than white people,” he later said.

Back on the road and blessed with an uncanny ability to hide in plain sight, Mr. Frank blended into the often cramped spaces of restrooms, elevators, bus stations and lunch counters.

He “was working against the currents of his time,” said Sarah Greenough, senior photography curator at the National Gallery of Art, which presented a retrospective of “The Americans” in 2009.

“While most magazines and other photographers were publishing pictures of America that celebrated American life as wholesome and optimistic — all Mom and apple pie — Frank looked beneath the surface in America to reveal issues the country is still wrestling with to this day,” Greenough said. “He depicted people plagued by racism, ill served by politicians, intoxicated by media and celebrities, and fascinated by the road itself.”

“The Americans” first came out in France in 1958, a year before renegade publisher Barney Rosset printed an English-language edition. Despite Kerouac’s introductory praise, the book was not well received at first and was out of print within a year. Popular Photography magazine called it “a wart-covered picture of America by a joyless man.”

But by the late 1960s, “The Americans” was gaining recognition as a cultural classic and was anointed one of the century’s seminal photography collections.

The pictures “took us by ambush,” John Szarkowski, the photography curator at New York’s Museum of Modern Art, told the Times in 1972. “We knew the America that they described, of course, but we knew it as one knows the background hum in a record player, not as a fact to recognize and confront. Nor had we understood that this stratum of our experience was a proper concern of artists.”

Mr. Frank never abandoned still photography, but he had a restless artistic temperament. Before “The Americans” had registered in the public imagination, he had moved on to making low-budget avant-garde films. Among his best known was his debut, “Pull My Daisy” (1959), co-directed with painter Alfred Leslie.

“Pull My Daisy” had a scratchy, home-movie look and featured Beat eminences such as Kerouac, Allen Ginsberg, Gregory Corso and Peter Orlovsky taking part in mischievous, absurdist horseplay.

In 1972, Mr. Frank teamed with the Rolling Stones, and a photograph from “The Americans,” depicting a collage of pictures on the wall of a tattoo parlor, was used for the cover of the band’s classic album “Exile on Main St.”

Mr. Frank joined the Stones on tour, filming the band before, during and after its concerts.

“I didn’t care about the music,” he told the Times in 2015. “I cared about them. It was great to watch them — the excitement. But my job was after the show. What I was photographing was a kind of boredom. It’s so difficult being famous. It’s a horrendous life.”

The result was an explicitly titled, little-seen but infamous film. The documentary captured the exuberance of the Stones’ live performances, but it also depicted the unbridled, hedonistic excesses of the rock-and-roll life, including drug use and debauchery.

Litigation prevented the film from being commercially released. It was shown only rarely.

Mr. Frank produced more than 30 documentaries, films that had limited commercial appeal but were cited as formative influences by filmmakers such as Jim Jarmusch and Richard Linklater.

In the late 1970s, Mr. Frank returned to still photography, after a fashion, often creating collages out of his images. As “The Americans” was rediscovered, Mr. Frank’s early photography increasingly came to be the subject of museum exhibitions. By the 21st century, original prints from “The Americans” sold for well into six figures.

Robert Louis Frank was born in Zurich on Nov. 9, 1924. His German-born Jewish father imported record players and radios. He did not want to follow his father into that trade, regarding it as dull and confining.

His artistic escape was photography, which he learned through apprenticeships. His portfolio proved so impressive that, after arriving in New York in 1947, he won commercial photography assignments for Harper’s Bazaar and other publications.

But his frustration with the strictures of journalism led him on photographic sojourns to South America and Europe.

Mr. Frank also cultivated the friendship of two eminent photographers, Edward Steichen and Walker Evans. They helped him win a Guggenheim Foundation grant, which he used to finance his travels for “The Americans.” Evans’s “American Photographs” (1938) served as Mr. Frank’s artistic road map for “The Americans.” (Mr. Frank became a U.S. citizen in 1963.)

In 1950, he married Mary Lockspeiser, a British-born artist, and they had two children before divorcing. In 1975, he wed sculptor June Leaf, his ex-wife’s close friend. She survives.

Mr. Frank endured several private tragedies, including the death of his daughter, Andrea, in a plane crash in the Guatemalan jungle in 1974. Around the same time, his frequent artistic collaborator Danny Seymour vanished on a sailboat off the Colombian coast.

In the aftermath of Andrea’s death, his son Pablo Frank was eventually diagnosed with schizophrenia and died by suicide in 1994. The losses had an indelible effect on Mr. Frank’s art. His photography took on a darker character, and he began to merge images together or add scratches or words to his prints.

Despite the personal setbacks, Mr. Frank continued to publish books and make films. His New York studio was a jumble of detritus from a creative life, including the word “EAT” scrawled on a wall by bohemian musician and writer Patti Smith. In his later years, the National Gallery of Art acquired many of Mr. Frank’s photographic works, including the film and contact sheets from “The Americans.”

Mr. Frank was given to gnomic comments about his life and work, but his guiding motto was as clear and uncompromising as one of his photographs of America.

“Less taste and more spirit,” he said. “Less art and more truth.”