From the New York Times in 2012:

A Regime’s Tight Grip on AIDS By DONALD G. McNEIL Jr.

Published: May 7, 2012 93 Comments HAVANA — … Ms. García is alive thanks partly to lucky genes, and partly to the intensity with which Cuba has attacked its AIDS epidemic. Whatever debate may linger about the government’s harsh early tactics — until 1993, everyone who tested positive for H.I.V. was forced into quarantine — there is no question that they succeeded. Cuba now has one of the world’s smallest epidemics, a mere 14,038 cases. Its infection rate is 0.1 percent, on par with Finland, Singapore and Kazakhstan. That is one-sixth the rate of the United States, one-twentieth of nearby Haiti. The population of Cuba is only slightly larger than that of New York City. In the three decades of the global AIDS epidemic, 78,763 New Yorkers have died of AIDS. Only 2,364 Cubans have. Other elements have contributed to Cuba’s success: It has free universal basic health care; it has stunningly high rates of H.I.V. testing; it saturates its population with free condoms, concentrating on high-risk groups like prostitutes; it gives its teenagers graphic safe-sex education; it rigorously traces the sexual contacts of each person who tests positive. By contrast, the response in the United States — which records 50,000 new infections every year — seems feeble. Millions of poor people never see a doctor. Testing is voluntary, and many patients do not return for their results. Sex education is so politicized that many schools teach nothing about protected sex; condoms are expensive, and distribution of free ones is haphazard. Cuba has succeeded even though it has the most genetically diverse epidemic outside Africa. Almost all American cases are of one strain, subtype B. Cuba has 21 different strains. The genetic diversity is a legacy of its foreign aid. Since the 1960s, Cuba has sent abroad thousands of “internationalists” — soldiers, doctors, teachers and engineers.

A 1987 article estimates Cuba had 65,000 troops stationed in Africa. Haiti became a conduit of AIDS infection in the New World due in part to Francophone middle class Haitians getting UN and local government jobs in Africa. Cuba also sent doctors to Africa, but it also sent a huge number of young soldiers. This account says a total of 425,000 Cuban “volunteers” were in Africa at some point. But maybe guys who volunteer for ground combat are less likely to bring back AIDS than other venereal diseases?

Stationed all over Africa, they brought back a wide array of strains. According to a study in 2002, 11 of Cuba’s 21 strains are unknown elsewhere, formed when two others mixed. And Cuba’s success has come despite its being a sex tourism destination for Europeans and Canadians. While the police enforce laws against overt streetwalking, bars and hotel lobbies in downtown Havana are filled with young women known as jineteras — slang for “jockeys” — who approach foreigners, asking if they would like to go for a drink, or perhaps dancing, with the unspoken assumption that it will lead to more. Even so, of the roughly 1,000 new infections diagnosed each year, 81 percent are among men and very few among young unmarried women. … The few Cuban women who are infected usually get the virus from partners who are secretly bisexual, experts said. “Homo-bisexual transmission” is its own category in Cuba; socially, a man who occasionally has sex with other men is not considered gay if he is a “top” — the penetrative partner, explained Ramón Arango García, a fashion designer and educator at the National AIDS and Sexually Transmitted Disease Prevention Center. Heroin use, which drives epidemics in many countries, is virtually nonexistent in Cuba, officials insist. And since 1986, only 38 babies have been born with the virus. … In 1983, Fidel Castro visited the Pedro Kourí Institute, Cuba’s top tropical disease hospital, to hear a presentation on malaria and dengue fever. As it ended, he suddenly asked the director, “Gustavo, what are you doing to keep AIDS from entering Cuba?” Dr. Gustavo Kourí, son of the institute’s founder, was caught off guard, Dr. Pérez said, and stammered: “AIDS, comandante? AIDS? It is a new disease. We don’t even know whether it’s produced by a bacteria, a virus or a fungus. There isn’t much data on it, just what’s been reported in the United States and a few cases in Europe. It will take time to know how big it is.” Mr. Castro replied: “I think it will be the epidemic of this century. And it’s your responsibility, Gustavo, to stop it becoming a major problem here.” This was two years before any American president publicly uttered the word “AIDS.”

You are supposed to assume here that that’s because Ronald Reagan of Hollywood was so intolerant of gays while Fidel Castro was so tolerant, but of course it was the other way around. Heck, Hollywood nominated Javier Bardem for a Best Actor Oscar in 2000 for playing in “Before Night Falls” a rare anti-Communist movie. Bardem played a gay Cuban poet who has to flee homophobic Castroite Cuba for freedom in America, where he dies of AIDS.

Asked how Mr. Castro could have been so prescient, Dr. Pérez struggled to find the right word, then said: “Castro has luz larga” — “big lights,” the Cuban slang for automobile high beams. “He reads a lot. He sees far ahead.” … Until recently, Cuban society and government policies were deeply homophobic; in the revolution’s early days, gay men were sent to labor camps. Fidel Castro now publicly says he regrets that action.

To sum up what the NYT reporter doesn’t dare: Castro’s totalitarian policy in 1983-1993 of quarantine safely got Cuba through the worst years before there were good tests and some treatments.