U.S. Coast Guard members stand guard near bags containing cocaine estimated to be worth more than $23 million in Miami Beach. Despite other disagreements, the U.S. and Cuba have worked together to fight the narcotics trade. (Joe Raedle/Getty Images)

The river of illegal drugs rushing north through Central America and the Caribbean tends to avoid one conspicuous hook-shaped obstacle.

Cuba is surrounded by countries used as cartel way stations. But it has distinguished itself as a tough place to traffic drugs — and as an unlikely behind-the-scenes partner with its decades-long rival, the United States.

While the U.S. and Cuban governments have squared off over politics and the American economic embargo for generations, they have also quietly cooperated on drug-enforcement issues, passing information on movements of suspected drug boats through the Caribbean. As relations may be warming between the United States and Cuba, and as Latin American drug flows to the United States are shifting away from Mexico and toward the Caribbean, the narcotics issue could be a source of further cooperation between the two countries.

The drug trade is “starting to move back into the Caribbean, and I think that is a call to arms. We need to work with the Cubans in a far greater capacity,” said Mike Vigil, a former director of international operations at the U.S. Drug Enforcement Administration who also served as a special agent in charge of the Caribbean. “It’s insanity not to do so.”

In the eyes of U.S. counternarcotics officials, many of America’s closest neighbors regularly receive failing grades for their efforts to stop the drug trade. Mexico, where 100,000 people have died in drug-related violence over the past eight years, remains “a major transit and source country for illicit drugs destined for the United States,” according to a 2014 State Department report. In Jamaica, drug-related corruption is “entrenched” and “widespread,” while in Guatemala, “transnational drug trafficking organizations are able to move drugs, precursor chemicals and bulk cash with little difficulty,” the International Narcotics Control Strategy Report states.

But the same report offers rare praise for America’s longtime communist foe. At a time when other Latin American nations have increasingly questioned the human and financial costs of the drug war, Cuba has emerged as one of Washington’s most reliable allies in unwavering opposition to the decriminalization of narcotics.

“Despite its location between some of the largest exporters of illegal drugs in the hemisphere and the U.S. market, Cuba is not a major consumer, producer or transit point of illegal narcotics,” the report states. “Traffickers typically attempt to avoid Cuba and U.S. counternarcotics patrol vessels and aircraft by skirting Cuba’s territorial waters.”

Pre-revolution drug use

Cuba’s reputation — of omnipresent police, strict punishment for drug crimes and low demand from users — contrasts sharply with its pre-revolution heyday. Before the Castros came to power, Havana’s nightclubs and casinos had the full range of illicit substances, and opium dens were a fixture of the city’s once-bustling Chinatown. Soon after taking over in 1959, Fidel Castro and his rebel army shut down the casinos, imposed draconian drug laws, and sent addicts and others to Marxist re­education camps for hard labor. While American hippies grew their hair long and indulged in pot-fueled paeans to Che Guevara, the real communists in Cuba came to associate recreational drug use with ideological deviation and other political taboos.

Even today, the mere possession of a small amount of marijuana in Cuba can result in a prison term. Harder drugs bring even harder time.

While small amounts of marijuana are grown in Cuban closets and hidden corners of mountaintop farms, most of the drugs that reach the island are thought to be washed-up packages dumped by traffickers en route to Florida. Drug-sniffing dogs are a fixture of the baggage claims at Cuba’s international airports. Police officers are ubiquitous on Havana’s streets — and those are only the ones wearing uniforms. After decades of keeping political opponents under close watch, Cuba’s security services have an extensive surveillance system that makes local drug-dealing extremely risky, if not downright foolish.

“Cuba’s a police state, and I don’t believe the Cuban government wants to be a hub for drug smugglers,” said Barry McCaffrey, a retired general who served as the White House drug czar during the Clinton administration and is a former commander of the U.S. military’s Southern Command, which focuses on Latin America. “They saw it as a threat to their children, the workforce, their economy, their government.”

McCaffrey said there were “all sorts of direct communications” between the U.S. and Cuban governments during his tenure, including radio communication between the Coast Guard and Cuban authorities, although “I’m not sure we thought it was a perfect cooperation.”

“I thought they believed that the drug issue was a good way to regain contact” with the U.S. government, he added.

In 2013, Cuban courts sanctioned 628 individuals on drug-related charges, 273 of whom received jail sentences ranging from six to 10 years, according to the U.S. report. The Cubans make phone calls and send e-mails to U.S. authorities — sometimes including photographs — about suspected drug boats.

“Cuba continues to share vessel information with neighboring countries, including the United States, and has had increasing success in interdicting ‘go-fast’ vessels unilaterally and in coordination with other nations,” the U.S. report states, adding that the Cuban government notified the U.S. Coast Guard 27 times in 2013 about the presence of suspicious vessels in “real time.”

Over the years, cooperation on drug enforcement has been strained by the hostile politics between the countries. The U.S. Interests Section in Havana has a Coast Guard attache who serves as “drug interdiction specialist,” but it has no DEA officers.

Vicki Huddleston, the chief of mission there from 1999 to 2002, said that even though the Cubans would send radio messages about passing narcotics speedboats, U.S. policy at the time was not to answer.

“We were prohibited from saying in return, ‘Thank you, we’ve got it,’ ” Huddleston said. “So they just kept repeating it.”

Smuggling scandal

Still, a notorious drug-trafficking case remains one of the darkest episodes in the Castro era. In 1989, one of Cuba’s ­highest-ranking military commanders, Gen. Arnoldo Ochoa, was sent to the firing squad along with three others snared in a drug-smuggling scandal. Stunned Cubans watched his trial on television, and he and other high-ranking military and intelligence figures were found guilty of taking bribes from Colombian cocaine traffickers.

The incident remains an ugly scar on the Castro legacy, marking one of the first times that Cubans saw the curtain pulled back on the shadowy dealings of supposedly infallible communist officials. But it was also used to send a zero-tolerance statement to anyone else in the government about the temptations of drug riches.

Cubans now fear that message will fade as more and more tourists arrive, including from the United States, potentially boosting local drug demand.

In a country where government officials and police survive on salaries of $50 a month or even less, they wonder how authorities will keep the corrupting powers of drug traffickers at bay once the Castros are gone.