President Fidel Castro declared tonight that Cuba has "never" shipped Soviet-made arms to Nicaragua's Sandinistas or other revolutionary movements of Central America.

The unusually categorical denial, which came in a lengthy speech on Cuban Armed Forces Day, amounted to a direct challenge to frequent charges by the Reagan administration that Cuba is supplying arms of Soviet origin to rebels in El Salvador in cooperation with the Sandinista leadership.

A Foreign Ministry official said it marked the first time Castro has spoken publicly in such clear-cut language on the subject. But Castro avoided mention of other types of possible aid, such as training, or help in arranging the purchase and transit of arms from other sources, such as East Germany.

"It is known that in our agreements with the Soviet Union, there are arrangements that say we cannot reexport our arms," Castro declared. "We have never had a case of reexporting Soviet arms, or arms made in Cuba, to another country. Never have we given Soviet arms to revolutionary movements."

The Cuban leader spoke for two hours and 20 minutes to about 15,000 blue-shirted recruits in the 163rd Corps of the Militias of Territorial Troops standing patiently in Havana's Revolutionary Square.

It is to arm these new militias -- which Castro said now number more than half a million across the country -- that Cuba has been receiving increased Soviet arms shipments, not to supply Nicaragua or Salvadoran and Guatemalan rebels, Castro said.

"They elaborate all these lies to justify their destabilization and aggression against Nicaragua," he added.

Insurrections in these countries grew from economic and political oppression rather than Soviet, Nicaraguan or Cuban intervention, he said. This, too, seemed a response to Reagan administration portrayals of Central American rebel movements as the product of outside agitation. Putting the struggle in the context of the U.S.-Soviet struggle for influence, Castro said, was "one of the great lies of Central America."

"The fact is that East-West differences have nothing to do with Central America," he said.

Castro's speech appeared intended as a rebuttal to widely publicized pronouncements by President Reagan during his visit last week to South and Central America.

The Cuban government seemed particularly eager to send this response back to the United States, inviting U.S. journalists to Havana to cover the speech and a 15-minute military parade that followed it.

Castro referred on several occasions to Reagan's trip and charged that its purpose was to reinforce the U.S. policy of isolating Nicaragua's Cuban-backed revolutionary government.

Since Reagan passed through neighboring Honduras, he added, attacks by counterrevolutionary guerrillas on targets in Nicaragua have increased and dozens of Nicaraguan children were killed in a helicopter crash that Castro said was caused "directly or indirectly" by the U.S.-backed guerrillas.

"This was after the Reagan visit, a visit in which he was supposed to be seeking peace," Castro declared. "This is the policy of the imperialists."

Although Castro did not place direct blame for the children's death on Reagan or the United States, he clearly sought to portray it as a consequence of what he said is support by the CIA for the Nicaraguan exiles operating out of Honduras.

The Cuban leader also cited a report from Washington two days ago attributed to the CIA saying that Cuba has dispatched another 10,000 soldiers to Angola, raising to 30,000 the total of Cuban troops in that African country.

"I won't say if it is true or if it is a lie," Castro said, drawing chuckles from his audience of militiamen and Army officers.

"But if we did it, we have only fulfilled our revolutionary duty in the face of imperialism," he said.