Famed director Werner Herzog’s newest film opens with a view of UCLA’s Kerckhoff Hall taken from the northern corner of the Court of Sciences.

With Herzog’s distinctively raspy voice providing the narration, the camera soon moves along a corridor in Boelter Hall, turning into room 3420. There, computer science professor Leonard Kleinrock is pounding on the side of the Internet Message Processor, or IMP, with his fist, demonstrating its military-grade hardiness. A refrigerator-sized hunk of metal and electronics, the impregnable IMP once performed a function that is now handled by tiny devices inside laptops, cellphones and smartwatches. But the IMP was key to the launch of the internet, which took place in Kleinrock’s lab in October 1969.

Herzog’s new documentary, “Lo and Behold: Reveries of a Connected World,” derives its title from a famous anecdote Kleinrock spins about that fateful night in his lab. Researchers trying to type “login” on a machine that was connected to the Stanford Research Institute only managed to punch in the first two letters before the system crashed. The institute, like UCLA, was a hub of what was then called the ARPAnet.

“Lo,” Kleinrock now says, was an inadvertent omen for the coming revolution in human communication, a revolution that continues to reshape society.

Courtesy of Magnolia Pictures A scene from Werner Herzog»s film on the impact of the Internet shows Buddhist monks on their cellphones.

Premiering in Los Angeles and across the country Aug. 19, Herzog’s film explores the world the internet is still creating. In addition to Kleinrock, “Lo and Behold” features others who attest to the power of this technology — scientists who address its vast potential, a family brutalized by online comments after a young girl’s death and an astronomer who speculates on the global chaos that could result if a once-in-a-millennium solar flare disables electronic communications.

“Most astonishing for me is that nobody foresaw what was coming,” Herzog said. “I am speaking now even of science fiction projections into the future in the 1950s and ’60s. There were colonies on Mars, and flying cars over Los Angeles with housewives and their dogs in the sidecar. But nobody had the internet on their radar, including those who started to create it.”

Actually, Kleinrock said, he had more than an inkling at the time about what networking would provide in the future.

In a July 3, 1969, UCLA press release announcing that UCLA would become the first station in a nationwide computer network, Kleinrock hypothesized, “As [computer networks] grow up and become more sophisticated, we will probably see the spread of ‘computer utilities,” which, like present electric and telephone utilities, will serve individual homes and offices across the country.”

What the computer scientist didn’t envision was that one day his granddaughter and his 99-year-old mother, now deceased, would be on the Internet at the same time, he said. “I did not foresee the powerful community side — the social network side — of the internet and its impact on every aspect of our society. It was not until email swept the network in 1972 that I realized the power of using the internet to allow people to interact with others.”

Working with Herzog, said Kleinrock, “was a fabulous immersive experience. His approach was totally unique in the way he captured footage. … His surprising questions and comments came out of left field and introduced views and ideas that were intriguing and provocative.”

The film has not made Herzog an internet acolyte. He does not carry a cellphone. He rails against a culture where reading and social engagement have given way to zoning out while mesmerized by a handheld device. But the Oscar-nominated filmmaker does not blame Kleinrock or anyone else who helped breathe life into the beast.

Is the internet inherently good? Bad?

“It is neither,” Herzog said. “It doesn’t have such qualities. Humans have these qualities. The internet only has technical qualities.”

During his long career, Herzog has directed, written and produced dozens of films and won acclaim for “Fitzcarraldo” (1981, best director, Cannes Film Festival), “Grizzly Man” (2005, Alfred P. Sloan Feature, Sundance Film Festival) and “Encounters at the End of the World” (2009, an Oscar nomination for best documentary). “Lo and Behold” had its world premiere at the 2016 Sundance Film Festival and has screened at the 2016 BAM Cinemafest and the 2016 AFI DOCS.

The documentary began as a series of YouTube shorts on internet technology sponsored by network and application management company NetScout. But Herzog realized he had the makings of a full-length film on his hands when he took in the enormity of the subject.

This is not the first time Herzog has looked at a subject from many viewpoints. In a film that examines the death penalty, Herzog asks, first, if electricity is good, and then suggests considering the question from the standpoint of the man condemned to the electric chair.

One question “Lo and Behold” poses is: Does the Internet dream of itself?

“Nobody can answer it,” Herzog said. “It starts with the problem that we cannot really define dreams, and we cannot really define consciousness, whether there are computers or not. Sometimes, it is more important to ask a deep question than to ever get an answer.”

Kleinrock, whose contributions as a father of the internet have earned him such distinctions as the National Medal of Sciences and membership in the American Academy of Arts and Sciences, is today on a mission to encourage a deeper understanding of it.

Earlier this year, he and others affiliated with the UCLA Henry Samueli School of Engineering and Applied Science launched the UCLA Internet Research Incubator, offering $15,000 each to 12 undergraduates pursuing all manner of internet studies, from developing new uses to analyzing how its rich data and decentralized infrastructure influence society.

On Aug. 19, Magnolia Pictures’ “Lo and Behold” opens at the Nuart Theater in Los Angeles and at other venues worldwide. It’s also available via iTunes and other sites on the internet.