A U.S. Coast Guard crew had a frightening encounter with a shark earlier this week as they were taking a refreshing dip in the Pacific.

After completing operations for the day about a "zillion miles from land," more than 30 Coast Guard Cutter Kimball crewmembers -- along with an inflatable unicorn -- decided to take a much-needed break from the monotonous sea life and go swimming, according to post by the vessel's Facebook page on Wednesday.

Their fun would soon take a scary turn when the crew encountered and successfully warded off the estimated six- to eight-foot-long predator with their weapons. The ship's crew described the encounter as "one of the most amazing events many of us have ever experienced at sea."

AUSTRALIAN MAN PUNCHES 10-FOOT GREAT WHITE SHARK AFTER WIFE ATTACKED WHILE SURFING

The shark -- which they said was either a Long-Fin Mako or Pelagic Thresher -- didn't appear to be injured, and the vessel said shots were fired to keep it away from shipmates.

"It later joined a few smaller buddies that showed up and they swam off together," the Coast Guard said.

"Everyone was having a great day. Everyone was smiling and having fun. It was perfect! And then...Bridge personnel reported "Shark!" over the radio." the Coast Guard wrote. "As if right out of a Hollywood movie, a 6-8 foot shark (no exaggeration) surfaced at the Rescue Door and was swimming toward 30-40 people in the water about 30 feet away."

The crew had taken preparations for such an encounter, which included a small boat with extra crew stationed about 50 yards off the ship, and armed personnel maintaining a shark watch. It was described as a "fully vetted and tested plan."

Maritime Enforcement Specialist 1st Class Samuel Cintron -- who was on the shark watch -- spotted the predator, prompting his chief to yell, "Shoot it!"

"ME1 Cintron fired a well-aimed burst right at/on top of the shark to protect shipmates just feet away," the social media post said.

The shark then turned away for a few seconds before coming back.

"We kept directing people out of the water while keeping a clear line of sight on the shark," the Coast Guard added. "ME1 fired bursts as needed to keep the shark from his shipmates with amazing accuracy. The shark would wave off with each burst but kept coming back toward our shipmates."

The ship said panic from the shark encounter wasn't quite like the 4th of July scene from "Jaws," but once everyone realized what was happening, they stayed focused to solve the problem, and "moved with a purpose!"

(U.S. Coast Guard Cutter Kimball)

LONG ISLAND BEACHES CLOSE AMID SHARK SIGHTINGS: REPORT

Some of the crew used a ladder on the fantail, while others went for the open stern notch at the ship’s stern, where heaving lines were thrown to shipmates in the water. A large group swam for the small boat that "quickly looked like a vessel overloaded with SAR survivors," the Coast Guard said.

"All hands are safe and accounted for. We even saved the inflatable unicorn!" the Facebook post added.

The only injury was a scraped knee suffered by one crew member as he climbed aboard, which was fittingly located in between the jaws of his shark tattoo.

After the encounter, the crew's top requests for movies that night were “Jaws” followed by “Sharknado."

CLICK HERE FOR THE FOX NEWS APP 

"We have hundreds of years at sea between all of us and no one has seen or heard of a shark actually showing up during a swim call," the Facebook post continued. This is a sea story each of us will be retelling for YEARS!!!"