QUITO, ECUADOR, SEPT. 15 -- Cuba's delegate to an international AIDS conference here described today one of the most aggressive programs of any country to control spread of the disease, including widespread testing of the island's 10 million people and of nearly everyone entering the country and a virtual quarantine for Cubans known to be infected.

"Our country is a poor country," said Dr. Hector Terry, a deputy minister of public health, in an interview. "If many Cubans become infected and sick, I do not know how we would take care of them. It would cost too much. We really have to prevent such a situation."

The meeting here is the first international conference on acquired immune deficiency syndrome in Latin America. Sponsored by the Pan American Health Organization and World Health Organization, the two-day conference drew 500 specialists and was beamed by television to 500 locations in 30 countries, including Cuba.

The measures described by the Cuban delegate have been only debated in other countries represented, including the United States.

Terry said the first steps came in 1983, even before human immune deficiency virus, HIV, the agent that causes AIDS, was identified. Cuba banned imported blood and blood products believed even then, and later shown, to transmit the disease, he said, and no Cuban hemophiliacs have become infected.

Once HIV was isolated, scientists developed a blood test to identify those infected with the virus, Terry said, and Cuba has used the test on 1.1 million inhabitants.

The testing has detected 147 infected individuals, according to Terry. It usually takes five or more years to show symptoms of the disease after infection. Five Cubans have died of AIDS, and one remains ill, he added.

Cuba is the first country to have tested its population so extensively, according to a Pan American Health Organization official. Mexico is completing a similar survey, and the United States intends to include AIDS testing in one of its routine household health surveys.

Although AIDS initially spread only among homosexual men in Cuba, as in the United States, it is now spread heterosexually, Terry said. Intravenous drug abuse does not appear to play a significant role in Cuba. Bisexual men appear to have spread the virus to heterosexuals.

Cuba has tested 23,000 pregnant women, with all findings negative, and, beginning next month, expects to begin testing anyone who enters a hospital or goes to a physician's office, Terry said. U.S. officials have been debating such widespread testing, but a final decision has yet to be made.

The Cubans believe the virus first entered the country in 1982 when a Cuban living in New York City became infected and then spread it to others after returning home, said Francisco Machado, a biochemist working with the Cuban program.

Every Cuban national who was out of the country between 1975 and 1986 was tested for HIV infection, including soldiers returning from Angola, but "we detected a low number of infected people," Terry said. There are about 50,000 Cubans, most of them troops, in Africa.

Some scientists and others have speculated that Cuba probably has a higher infection rate than it reports because so many soldiers had served in Africa where AIDS is widespread. Terry said some soldiers were infected, but not many.

Cubans returning from abroad and foreigners intending to stay in Cuba for three months are tested for HIV infection, Terry said. Diplomats and tourists are not tested. Infected foreigners are sent home.

Those Cubans who have been infected with HIV are sent to a sanitorium in Boyeros, a municipality in the Havana suburbs, Terry said. He did not use the term quarantine. The head of the World Health Organization's AIDS program, Dr. Jonathan Mann, who attended the conference, has argued against quarantine on the basis that this would discourage carriers from turning to health authorities.

The interned Cubans are allowed home visits, he said, but are warned that if they have sexual relations, they need to protect their partners.

"We know that there are people who are not using the condom," Terry said. "If his wife wants to have sex without that protection, it is her problem."

The HIV-infected individuals also participate in scientific experiments. Machado said 40 of the 147 have been treated with interferon for six to 12 months and appear to be stable, with essentially normal levels of T4 white blood cells -- the ones wiped out by the AIDS infection.