Matthew Luke Hodder, 32, appeared before the High Court in Dunedin this morning where details of the conspiracy were made public for the first time.
On August 3 last year, a 254m container ship the Spirit of Auckland was transiting through Philadelphia when law enforcement agencies seized two large duffel bags, containing 91kg of "bricks" of the class-A drug, from an intake grate under the vessel.
According to court documents, it is known as "a parasite importation".
After the GPS trackers became water damaged, the traffickers were unaware the cocaine had been confiscated and the ship docked in Melbourne four weeks later
Enter Hodder, who Australian media named as an ex-stripper and is described by his online agency as "an experienced model and male entertainer . . . willing to give anything a shot".
The defendant also goes by the name Matty Thunder and played "DIY Dave" in advertisements for Magic Mike.
Another man, who has denied his role and has name suppression, tested equipment and carried out reconnaissance on the Spirit of Auckland.
Equipped with sandbags, wrenches, a long metal rod and even an underwater scooter, they were prepared.
However, during a test dive they were intercepted by Australian authorities and their plans were aborted.
On September 13, Hodder flew from Melbourne to Queenstown.
He and his alleged co-defendant sat separately during the flight and hired a red Toyota Highlander which they drove to Dunedin.
After renting a motel, Hodder visited outdoor supply stores and spent $4000 on dive equipment including a wetsuit, pressure gauges, a torch, dive bag and snorkel.
"Mr Hodder was persistent throughout the sale exchange and offered cash at one point to help facilitate hiring the air tanks with more ease," a summary of facts said.
Court documents noted he was unaware what exactly he was supposed to be taking off the ship but he knew it was illegal and of significant value.
On September 16, the men drove to Carey's Bay to scope out the shipping berth and when they returned to their hotel for the night, police installed listening devices to capture their conversations.
At 3.13am the next day, the men returned to claim the $27m cache.
An intercepted conversation during the drive proved revealing.
When the co-defendant commented on the cost of fuel, Hodder told him: "It's alright mate, after tonight you're not gonna have to worry about the petrol prices. You can buy a petrol station. Put whatever prices you want".
Hodder changed into his diving gear and hid under a dock in Port Otago's restricted area, the court heard.
As the Spirit of Auckland entered the shipping channel, the co-defendant drove alongside it, communicating its position by radio to the diver.
Hodder performed numerous dives on the starboard side of the vessel and swam around the stern as he became increasingly desperate.
Police tracked their every movement.
When Hodder was unable to locate the bags, he came ashore and there were hurried conversations with people overseas involved in the plot.
They were sent a video of where the drugs were stashed, prompting a discussion about a second dive, but because of a lack of air in the tanks, they ultimately decided to return to the city for breakfast.
When they parked their vehicle, police swooped, seizing four cell phones, a laptop and cash in three denominations during the arrest.
Hodder pleaded guilty to attempting to take possession of cocaine for the purpose of supply, a charge which carries a maximum penalty of 10 years’ imprisonment.
Justice Jonathan Eaton delayed entering a conviction so the defendant could complete the Drug Treatment Programme while in prison.
Hodder will be sentenced in February.