In mid-July, a U.S. Navy aircraft that was patrolling the eastern Pacific Ocean reported a 40-foot vessel hundreds of miles from the shore.

Eventually, U.S. Coast Guard personnel boarded that vessel, known as a semi-submersible. A blog post detailing the operation describes the Coast Guard cutter Stratton moving through the “inky darkness of night,” and a quick search for the sea-green vessel.

After taking control of the semi-submersible, the crew detained four people — and found more than 200 bales of cocaine.

“This is pretty big,” Chief Warrant Officer Allyson Conroy told The Post.

The drugs were valued at more than $181 million. So, yeah, that’s a lot of cocaine.

In fact, this was the “largest recorded semi-submersible interdiction in Coast Guard history,” according to a news release on the operation. And here’s what makes it even more interesting: The July effort marked the second time that the Stratton had stopped this type of narco-submarine in a two-month span.

In June, the Stratton crew also stopped a submersible carrying 5,460 pounds of cocaine.

Since November 2006, just 25 “known” interdictions of these kinds of subs have occurred in the eastern Pacific, according to the Coast Guard.

“Semi-submersibles are our ‘white buffalo,’ ” Capt. Nathan Moore, Stratton’s commanding officer, said in the blog post. “They’re extremely rare, seldom seen, but they exist.”

The transportation of narcotics isn’t just limited to secret tunnels under the border anymore, of course. Traffickers also try to move massive amounts of drugs on the high seas, or — in cases like these — basically on the surface of the high seas. That’s what happens with semi-submersibles, which can be tough to spot and can carry large amounts of drugs.

“They blend in very, very well, so they’re hard to notice,” Conroy said. “If you can’t see them, then you can’t interdict them.”

Sometimes even if officials do see them, smugglers will sink the vessels.

Drug subs — both the semi-submersible and completely submersible variety — aren’t exactly a new phenomenon. The Post reported on them in 2009, writing at the time that “more than a third of the cocaine smuggled into the United States from Colombia travels in submersibles” and that the “strange semi-submarines are the cutting edge of drug trafficking,” ferrying “hundreds of tons of cocaine for powerful Mexican cartels that are taking over the Pacific Ocean route for most northbound shipments, according to the Colombian navy.”

According to that 2009 story, during the previous three-year stretch, “U.S. officials and their Colombian counterparts detected evidence of more than 115 submersible voyages.” The majority were not apprehended.

The submersibles are equipped with technologies that make them difficult to intercept, even though U.S. forces use state-of-the-art submarine warfare strategies against them. Authorities say most slip through their net.

“You try finding a floating log in the middle of the Pacific,” one DEA agent said.

In 2012, the New York Times wrote that narcotics organizations were bankrolling machine shops “to build diesel-powered submarines that would be the envy of all but a few nations” — and noted that the vessels were becoming increasingly sophisticated.

The Economist has also covered this kind of stuff. So has Vice.

“Narco sub emergence is all about cartel risk management and cost-benefit estimations related to maximizing profit,” Robert Bunker, adjunct research professor at the U.S. Army War College’s Strategic Studies Institute, told The Post in an e-mail. Bunker wrote that it was “probably safe” to say “dozens” of semi-submersibles were in use and being constructed at any given time.

“All of the work in this area is about estimates and educated guesses — no one really knows since illicit economies and the groups that operate in them are inherently secretive,” Bunker noted in his e-mail.

If you watch the Coast Guard video at the top of this post, you can see what makes semi-submersibles such a challenge for U.S officials. The small vessel is painted in such a way that it is camouflaged to the color of the waters. Think of how hard that would be to spot out there in the ocean.

“Locating a semi-submersible narco sub is much like finding a needle in a haystack,” Bunker told The Post. “They are built in coastal Mangrove swamps under jungle canopies, and once they hit the open seas, provide minimal visual, radar and infrared (heat) signatures.”

On Monday, the Coast Guard held a news conference about cocaine seizures from operations in waters off of Latin America’s Pacific coast. It touted the efforts in that region, saying said that in a 10-month span, authorities had seized more than 100,000 pounds of cocaine.

“This is about more than just trying to keep drugs off U.S. streets,” the Coast Guard commandant, Adm. Paul Zukunft, told reporters, according to Fox News. “The cultivation, trafficking and distribution of narcotics fuels violence and instability throughout the Western Hemisphere, leaving a path of destruction directly to the door step of the U.S.”

Read More:

A ‘monumental’ rescue: Coast Guardsman swims a mile in choppy seas to save four fishermen, one at a time

On Greek island, migrants find that paradise quickly turns into purgatory

The real-life story behind Disney’s forthcoming Coast Guard rescue movie, ‘The Finest Hours’