In April 2009, four Somali pirates held the crew of the Norfolk-based container ship Maersk Alabama captive before escaping with Captain Rich Phillips in the ship’s orange lifeboat. It was a selfless and heroic act by Phillips in the treacherous waters around the impoverished Horn of Africa. Among other supplies, the Alabama was carrying vital food and water to Kenya.

Eventually, the U.S. Navy caught up with the lifeboat. The dramatic five-day ordeal ended when one pirate left the cramped lifeboat to “negotiate,” and Navy SEAL snipers shot the three others as they waited.

On Friday, “Captain Phillips,” a movie representation of these events starring Tom Hanks, was released to great critical acclaim by Sony Pictures. In its first weekend, the movie grossed $28 million, putting it in second place at the box office behind the space flick “Gravity.”

This is all great for Hollywood, and also for the Navy, which, Phillips aside, is the hero of the story. They act professionally and efficiently and are deadly. Green light and “pop, pop, pop.” Three headshots. The Somalis make easy villains. They are not motivated by religious hatred or terrorism but simple greed.

Indeed, what’s not to like for the U. S. Navy, which also came off well in the recent “Zero Dark Thirty”? The SEALS are certainly barking.

My question, though, is this: How far did the Navy go, using public money, to assist Sony Pictures and Tom Hanks. True, the Navy’s participation was 14 months ago, but given the moment it might seem a sore spot.

Because of today’s budget impasse in Congress and the ongoing sequestration, thousands of civilian workers, including many military contractors in Virginia, are being furloughed. We also have conservatives raging against needless government spending.

According to The Virginian-Pilot, a Navy admiral met with the film’s executive producer, Gregory Goodman, in Los Angeles when the film was being planned in 2012 and offered red carpet treatment if the production was done in Norfolk.

So off to Tidewater they went, secretly, in June 2012. True to its word, the Navy laid on the USS Wasp, a small aircraft carrier, to stand in for the USS Boxer, which participated in the rescue. The Destroyer USS Truxton played the Bainbridge. The frigate USS Halyburton, which was in on the real rescue, got to play itself.

Besides the ships, which maneuvered off the Virginia coast for the movie, there were hundreds of real Navy sailors among the actors, not to mention Seahawk helicopters and even an unmanned drone.

So who paid for it all? My calls to Navy public affairs were not immediately returned. A Navy public information officer told Bloomberg’s Political Capital that the Navy’s help did not involve taxpayer money. One reason was the three warships were going to be at sea training anyway. The Navy did provide the presence and advice of a SEAL master chief for two weeks, but that was apparently to make certain the details were accurate.

Obviously, it is in the Navy’s interest to seek out as much positive publicity as it can. But the idea that no public money was involved seems like a pirate story to me. This is a thrilling and moving film, to be sure, but keep in mind you are probably paying more for it than the price of your ticket.

UPDATE:  Lt. Lauryn Dempsey, a Navy spokesperson, called me and said that the Navy made the ships available “at no expense to the U.S. taxpayer” because they were on maneuvers off Norfolk anyway. On occasion, the Navy will make its resources available to the movie industry, as it did with the 1986 hit  “Top Gun.” Dempsey said the Navy did bill Sony Pictures for some of its expenses, such as for loading film and other equipment, a lift and the use of a dumpster.