When “2001: A Space Odyssey” premiered, its early audiences didn’t see the future. They saw red.

The film was shown on April 3, 1968, at Times Square’s Loews Capitol Theater for an invited audience of 1,500 studio executives, media bigwigs and celebrities, including Paul Newman, Gloria Vanderbilt and Henry Fonda.

Simon & Schuster

As the two-hour-plus film unspooled, the crowd initially got restless, then could be heard booing and muttering, “Let’s move it along.” At intermission, the film’s director, Stanley Kubrick, looked shaken. Arthur C. Clarke, the great science fiction writer who developed the script, was crying.

An usher had been positioned by the door to count walkouts, and by the time the film was finished, 241 people had exited early.

Later that night, Kubrick held a party at The Plaza hotel, but he was hardly in a celebratory mood. After everyone had left at 3 a.m., he paced the room, chain-smoking and fuming to his wife, “My God, they hated it.”

Reviews, too, were brutal. The Village Voice sneered that the film was a “thoroughly uninteresting failure.”

But then a funny thing happened. The film opened to the general public, and they were fascinated by it, especially younger counterculture types.

Lines formed on opening day. A few weeks later, “2001” had raked in $1 million from just eight screens.

David Bowie’s 1969 song “Space Oddity” was inspired by a stoned screening.

“2001” celebrates its 50th anniversary this month and it appears time has been kind to it. It’s now considered one of the greatest films of all time. It’s visually stunning, deliberate to the point of being almost meditative, and tackles big ideas without spoon-feeding the audience answers.

Benson calls the film, which contains wordless sections filled with striking imagery, an “audio-visual experience.” The (thin) plot concerns the excavation of a strange monolith on the moon.

The discovery ultimately sends a team of astronauts (played by Keir Dullea and Gary Lockwood) to Jupiter, but their mission is sabotaged by an obstinate computer known as HAL.

Production of the film began with lofty ambitions. Kubrick, coming off the success of 1964’s “Dr. Strangelove,” wanted to make a movie about nothing less than “Man’s relation to the universe.”

The director sought out Clarke. The two spent weeks discussing ideas and a potential script, often in Kubrick’s penthouse apartment at Lexington Avenue and 84th Street, other times just wandering the streets of New York.

Arthur C. Clarke visits the set of “2001: A Space Odyssey.”Courtesy of Everett Collection

MGM ultimately agreed to make the film for a respectable $5 million.

“2001” had several potential titles, including “Journey Beyond the Stars” and “Farewell to Earth,” but Kubrick later settled on the winner in a nod to Homer’s epic poem “The Odyssey,” of which there are echoes in the movie.

Filming was set to begin in December 1965 at a British studio. Kubrick and his two lead actors were all afraid of flying, so they traveled by boat to Blighty.

“The most convincing film about space exploration ever made would be captained and crewed by groundlings,” Benson writes.

The film’s opening sequence was actually shot last, because it was so daunting. It is set at the “dawn of man,” as ape-like pre-humans battle over a water hole.

To play the lead ape-man, Kubrick hired mime Dan Richter, who had to learn to convincingly mimic the movements of Kubrick’s creatures and spent hours studying an ape at a London zoo.

Richter was also a heavy drug user. He had moved to Britain because the country recognized “legal addicts,” and during production, he was shooting a mixture of heroin and cocaine up to seven times a day under the care of a doctor.

A pre-human in “2001: A Space Odyssey”Courtesy of Everett Collection

One of the most harrowing shots involved a leopard leaping out of nowhere and attacking one of the apes. When it came time to shoot the scene, the actors and crew were still unnerved by the presence of the big cat — more so when they saw that Kubrick was directing from the safety of a metal cage.

The “Dawn of Man” sequence ends with one of the most memorable shots in movie history.

The ape-man discovers a strange black monolith. Touching it seems to give him knowledge of tools. He then picks up a discarded bone and uses it to beat a rival to death.

Afterward, he flings the bone away, the camera following as it spins through the air in slow motion.

The spinning bone then cuts to an oblong satellite, and the futuristic portion of the movie begins.

Kubrick was determined to make the film as realistic as possible, so he hired former NASA employees as consultants.

Stanley Kubrick finds his shot on the set of “2001: A Space Odyssey” at the MGM studios in Borehamwood, Hertfordshire, England, in 1966.Keith Hamshere/INACTIVE

The special effects were groundbreaking. The most astonishing involved an astronaut appearing to walk around the inside of his cylindrical spaceship, across the ceiling, down the walls and back to the floor again.

The trick was accomplished using a wheel-like moving set known as the centrifuge. It was 38 feet in diameter, weighed 30 tons and cost $750,000.

“It was made by the same aviation company that made Spitfires during [World War II],” Benson said.

The set rotated along with the camera, while the actor walked in place, as if in a hamster wheel. The effect gave the appearance of an astronaut walking around the interior circumference of the spacecraft.

The shots in which an astronaut floats while on a spacewalk were done using old-fashioned wires. The actor was shot from below so his body hid the harness.

Keir Dullea in “2001: A Space Odyssey”Courtesy of Everett Collection

A stuntman filling in for Dullea was required to hang for hours. Kubrick didn’t allow airholes in the spacesuit, so a hidden tank provided 10 minutes of air.

The stuntman worked out a series of hand signals to indicate he was running out of air, but one day, the impatient Kubrick ignored him and the stuntman blacked out. Kubrick disappeared from the set for two days for fear of what the stuntman would do to him.

The film’s ending leaves many scratching their heads. Kubrick and Clarke struggled with it even late in production.

“The most extraordinary thing is that there was never really a finished script,” Benson said. “Kubrick and Clarke kept changing what would happen.”

Upon Clarke’s suggestion, the film ends with Dullea’s character finding another monolith orbiting Jupiter. It transports him through a trippy star gate to an ornate bedroom. He ages and dies before being reborn as a fetus hovering above Earth.

An earlier version of the final scene was to include a voiceover explaining that the monolith is a product of an alien race whose members have become “lords of the galaxy,” but the idea was scrapped.

What’s left is open to interpretation, although Clarke published a companion novel that fills in some of the details.

To many, this inscrutability is part of the film’s genius. It can mean different things to different people.

“Kubrick was asked in ’68 to explain his film, and he refused,” Benson said. “He essentially said, ‘What would we think if Da Vinci had written on the back of the Mona Lisa, ‘‘The lady is smiling because she has rotten teeth’’? He said, “I don’t want that to happen to ‘2001.’”‘”