Cuba's already ailing economy was dealt a major blow yesterday as the government laid off 26,000 workers and temporarily closed the country's cigar factories.

The move, which followed failure of 90 percent of the country's tobacco harvest because of disease and which could involve the loss of as much as $100 million in needed export earnings, marked a further intensification of the most severe economic difficulties since the 1959 revolution.

According to industry sources, Cuba ships about 125 million cigars abroad annually, primarily to Europe, where their premium brands can command $8 to $10 a cigar at retail prices. The American trade embargo against Cuba prevents sale of the cigars in this country, although some find their way in by a variety of routes.

One industry source said it will not be long before the shortage will begin to be felt.

Prerevolutionary Cuba had a corner on the world cigar market, with an unrivaled reputation for quality and workmanship, according to Larry Garfinkel of Garfinkel Tobacconists here.

After the revolution, however, the quality of many Cuban brands dropped, in the view of some cigar connoisseurs, although Garfinkel said the top brands remain excellent as well as "expensive as can be."

Yesterday's closures came two months after Cuban President Ford Castro tightened his control of key government ministries in an attempt to arrest the year-long decline of the economy.

Although Soviet economic aid to the country is said by State Department sources to total $3 billion annually, this has not been insulation enough from inflation, low economic growth, declining foreign currency reserves and -- Cuban officials themselves increasingly stress -- low productivity tied to both management and labor inefficiency.

In addition, the country's key export crop, sugar, has been hit by disease and swine fever has reappeared in the eastern part of the country, Castro said in a speech Saturday to the third congress of the Cuban Womans Federation.

Castro called for a "special effort for the sugar harvest in all the provinces during the months of March and April, and an extraordinary effort in May and June to finish the harvest and do the planting." He highlighted the importance of sugar to the island's economy "especially now because the current high price of sugar can in part compensate for the effects of the various plagues, like in tobacco."

The U.S. Department of Agriculture estimated Cuba's 1977 tobacco crop at 45,000 metric tons and the 1978 crop at 46,000 metric tons.

For 1979, when the first outbreak of blue mold disease hit the tobacco crop, the estimate was 30,000 metric tons. Castro said the 1980 crop was about 5,000 metric tons.

In his speech Saturday, Castro said Cuba was suspending tobacco exports for this year and that some tobacco will be imported "to maintain the consumption levels for the population." Informed sources said Cuba already imports quantities of tobacco from Spain.

Blue mold can be effectively treated with a Swiss fungicide, Ridomil, according to Harvey Spurr, professor of plant pathology at the University of North Carolina, who also conducts research for the Agriculture Department.

The chemical is expensive, however, and in short supply. The United States, which also was hit with blue mold last year, has been able to buy only enough to treat 40 percent of its crop, Spurr said. Last year's U.S. and Canadian losses to the disease amounted to $252 million.

To combat the spore-borne disease, Cuban authorities reportedly have suggested the United States cooperate in a joint scientific effort. Financial restrictions are hampering the proposed exchange project, Spurr said. A State Department official indicated that the difficulties may be more political than economic. Such a program was possible, he said, if it could be proved to be "in the interests of the United States."

In an election year and with the recent imbrogilo over the Soviet combat brigade in Cuba still a vivid memory, the project could prove too sensitive for Washington this year.

Cuban authorities, meanwhile, have mounted strenuous efforts to wipe out the disease before the next tobacco planting in October. Contaminated plants must be burned, and, Spurr said, preplanting protection could prove effective in staving off another outbreak.

The Cuban Communist Party newspaper German in announcing yesterday that the 26,000 workers were being laid off, said they will receive unemployment pay equivalent to 70 percent of their salaries while the cigar factories remain closed, Agence France-Presse reported from Havana.

This could place a further strain on the economy, although it generally suffers from a labor shortage.

Castro's speech Saturday was part of a consistent effort during the past year to point out "deficiencies" in the Cuban system. Some of the problems listed by his brother Raul in a speech in November ranged from lazy workers to managerial misdeeds and lack of discipline "at the top."

For confirmed smokers of Cuban cigars, yesterday's developments need not be permanently distressing.

Walter E. Harris Jr., president of Alfred Dunhill of London, Inc., one of London's most exclusive suppliers of "smokers' requisites," said his customers are likely to feel bereft when the shortage begins to bite. They will then have two choices, he said, "stop or switch."

"History has already dictated the answer," he suggested, mentioning two brands of cigars made by Cuban exiles in the Canary Islands to the standard of Old Havana.