When U.S. Navy submarines glide past Point Loma and head to sea, what they do in the dark depths is mostly a mystery. Certainly it involves keeping an eye on other navies. Some U.S. submarines carry a portion of the American nuclear arsenal in their tubes.

During the Cold War, the Pacific was full of Soviet submarines doing the same job for the other side.

This dangerous world of submarine cat-and-mouse comes to the big screen again in “Phantom,” a new Hollywood action movie with a major San Diego connection.

About 80 percent of the movie was shot aboard the former Soviet B-39 submarine owned by the Maritime Museum of San Diego. The 1974 Foxtrot-class submarine has been moored in the bay along Harbor Drive since 2004.

Meanwhile, just across the water is Point Loma Naval Base, the heartbeat of U.S. submarines on the West Coast during the Cold War.

San Diego subs and their crews stalked Soviet subs like the Foxtrot from the 1970s through the 1990s. .

“Phantom,” a thriller starring Ed Harris and David Ducovny, depicts that world from the Soviet point of view.

Filmmakers say it is probably the first submarine movie shot on an actual sub. They used a compact digital camera weighing about 4 lbs, which allowed them to film in the tight corners of a real-life submarine. Some members of the movie crew reportedly fought claustrophobia during the three-week shoot.

“Phantom” was inspired by actual events. In March 1968, the Soviet diesel-electric submarine known as K-129 sank in deep water off the Hawaiian Islands.

Her country’s navy never found the wreck. The United States reportedly launched a secret salvage mission, the results of which are still murky.

Author Kenneth Sewell, a former U.S. Navy submariner, argues in his 2006 book “Red Star Rogue” that K-129 was poised to launch a nuclear ballistic missile attack on the United States when something went awry and the detonation sunk the boat.

The movie “Phantom” is loosely based on that outline. Filmmakers thought the San Diego B-39 submarine was similar enough to the K-129 to fill in for Hollywood’s purposes. Both were diesel-electric powered and carried nukes, though the sunken sub had extra tubes for intercontinental ballistic missiles and the B-39 only held nuclear torpedoes.

How did a Soviet submarine end up in the heart of its former enemy?

The Maritime Museum was the largest investor in a group that bought and moved the B-39 from the Seattle area, where it landed after a Canadian consortium purchased the decommissioned boat from the Russians in 1995.

Now, the B-39 and its more high-tech American counterpart, the former U.S. Navy submarine Dolphin, draw about a third of the museum's visitors.

“There aren't that many examples of Russian Soviet-era submarines around to look at,” said Raymond Ashley, museum chief executive. He added that the comparison provided by the submarines is pretty stark.

“You get a whole picture of the Cold War and how it looked on each side simply by going on those two ships.”

The Russians had it pretty tough, according to retired Navy Capt. Charles MacVean, who skippered the U.S. attack sub Seawolf in 1975 and later commanded San Diego's Submarine Development Group 1. MacVean has served on the museum's board.

The 300-foot Russian submarine didn't have enough bunks for all 78 sailors, so they had to “hot rack,” which means the mattress is still warm from the last person who occupied it. They also didn't have much fresh water for showers.

When MacVean first stepped aboard the B-39, it was eery for the former Seawolf commander.

“It was amazing to me to see how capable but crude this thing was. I’d seen them through a periscope, and on the surface from a distance they looked sleek and smooth,” he said.

“The habitability on this submarine is amazingly grim,” MacVean said. “I’d always had a lot of respect for Soviet submariners. They were always a very capable, tough bunch.”

The Soviet sub thriller isn't the only Hollywood splash that the San Diego museum has enjoyed.

The 2003 movie “Master and Commander” and 2011's “Pirates of the Caribbean: On Stranger Tides” were shot aboard the HMS Surprise, the museum's replica of an 18th century British frigate.

Those spurred the public to tour the tall sailing ship, and the museum got a couple nice bumps in ticket sales.

It remains to be seen if “Phantom,” which opened March 1, will create the same interest.

Reviews have been mediocre, according to the movie website Rotten Tomatoes. The movie-going public has been kinder than the critics.

MacVean liked the movie, saying it did a authentic job of portraying submarine life, good and bad – the cramped spaces, the claustrophobia, the slim chance for real relaxation but also the mutual respect and camaraderie in the crew.

“For a submariner, I found it well put together,” he said. “It made me resonate with my past.”

The amount of on-board drinking in the movie was pure fiction, he added.

In the 1980s, under President Ronald Reagan, San Diego was set to support up to 18 nuclear submarines as the Cold War raged on.

Today, Point Loma is the home port for six Navy nuclear fast-attack submarines. If you look hard at the northwest end of San Diego Bay, you may see the black top of one next to a pier.

“This is what victory looks like – six instead of 18,” MacVean said.

Bremerton, Wash., is the other large West Coast submarine base, after the Navy shuttered its Mare Island sub facility in San Francisco Bay. Pearl Harbor in Hawaii is the other big Pacific submarine installation.

The Maritime Museum had intended to sink the B-39 after a few years and create a reef for divers.

But San Diego school teachers and history enthusiasts made a public outcry, so the Soviet sub is staying.

Museum officials want to create simulations that allow visitors to take part in Cold War scenarios in which the B-39 and the Dolphin are stalking each other – not too different from the underwater tension depicted in “Phantom.”

Another real-world scenario would be the 1962 Cuban Missile Crisis, which was a 13-day standoff between American surface ships and Soviet Foxtrot subs like the B-39.

“We want to provoke thought and understanding about how close the world did come to a disaster,” Ashley said. “We think that will be compelling.”