Fidel Castro, his beard noticeably grayed, perspired profusely in the heavy evening heat as he harangued yet another crowd on the history of the Cuban revolution.

From the very beginning, he was saying, Yankee imperialists have been out to crush it. And now, he added, the Reagan administration has intensified the threat to one of its highest levels in the 24 years since Castro and his followers introduced Marxist revolution to the Western Hemisphere.

"Rarely has more menancing language" been used, he said. "Rarely has a leader of the United States expressed himself toward Cuba in a more brutal and sinister manner."

If nothing else, Castro's remarks last night on the 30th anniversary of his first revolutionary battle demonstrated that President Reagan's tough stand on Cuba and Central America has aroused concern in Havana. In a broader sense, they also pointed out the history-oriented perspective in which Castro and his Nicaraguan allies view administration efforts to undercut the Sandinista government and prevent its leftist friends from gaining power in El Salvador.

For them, the 56-year-old Cuban leader declared, U.S.-sponsored guerrilla attacks on Nicaragua and the dispatch of U.S. military forces for Central American exercises carry on a pattern of aggression established by U.S. Marines in the 1920s and brought home to Cuba by the 1961 U.S.-backed Bay of Pigs invasion.

"Nicaragua and Central America now are seriously threatened by the same demented and aggressive policies," Castro said.

To leaders with that perspective, Reagan's assurances that the United States has no intention of promoting war in Central America were likely to seem an uncomfortably thin guarantee. Ironically, they were being made in Washington last night at about the same time Castro was speaking here in Santiago, saying some very different things.

"Imperialism has not renounced the goal of destroying the revolution one way or another," Castro asserted, adding later: "We live in risky and difficult times."

The Cuban leader's remarks on Central American tension drew particular attention. They came in his first major address since December and followed an unusually long period of refusing to meet visiting American reporters.

In addition, the Cuban government shepherded a contingent of U.S. journalists to Santiago to record Castro's words at a time when administration policies for the region has become a major debate in the United States.

The portrayal he served up in some ways provided a mirror image of what Reagan administration officials say is going on in Central America. Although Castro repeated the leftist contentions that revolution cannot be exported, he simultaneously declared that it would pass from one Central American country to another despite the Reagan administration's resolve to prevent it.

"An attempt to crush the revolution of Nicaragua and El Salvador would be like trying to lance a tumor that would spill over Central America," he said.

In explaining their determination to defeat the leftist revolt in El Salvador, Reagan administration officials frequently have cited just such an eventuality, raising the specter of hostile leftist governments throughout Central America and eventually to Mexico.

But there seemed to be nothing triumphant in Castro's voice. He read his 85-minute speech with apparent care not to veer from the text. Observers who have heard his crowd-pleasing oratory over the years, said he seemed unusually subdued for what was advertised as a festive occasion.

The Yankee-baiting humor that has marked previous speeches was absent this time. Instead, Castro vowed that Cuban popular militias, now numbering half a million by official account, would turn Cuba into a bloody swamp for any U.S. soldier who tried to invade.

"How many men would imperialism need to occupy Cuba?" he shouted to the crowd. "Five million men would not be enough."

The island's population is just under 10 million.

But for what he said was the threat against Nicaragua, Castro offered a more sober analysis. Cuba has the strength to defend itself, he said, and strongly suggested that Nicaragua should count on doing the same.

More immediately, Castro hammered on Cuba's endorsement of the Contadora effort of Colombia, Mexico, Panama and Venezuela to calm violence in Central America before it escalates into such full-scale war. Foreign diplomats in Havana have expressed belief that Cuba's emphasis on negotiations is genuine. Castro's government, they say, fears it could do little to come to the aid of its friends if Central American hostilities escalated.