Officers aboard a legendary Spanish navy ship smuggled $400,000 worth of cocaine into New York City in a daring intercontinental scheme, federal sources said.

The officers aboard the Royal Spanish Navy training ship Juan Sebastián de Elcano were recruited to deliver the massive stash of dope by Colombian drug dealers while docked in Cartagena de Indias, authorities said.

Once in New York, the ship dropped anchor near the USS Intrepid on the West Side before the three officers delivered 20 kilos of coke to two Colombians in May, the authorities said.

The Colombians were arrested shortly after, but the officers weren’t busted until they arrived back in Spain on July 12, the sources said.