MADRID, Spain (AP) _ Madrid's suspension of aid to Cuba underscores pressure for democratic change in the former Spanish colony and further isolates Fidel Castro at a time when his main benefactor, Moscow, is getting stingier.

''It's an abrupt and historic decision,'' said political scientist Manuel Alcantara, a professor of Latin American affairs at Madrid's Complutense University. ''Because of the events in Eastern Europe, Spain feels some kind of responsibility about Cuba, to work for change there.''

As of today, 18 Cubans were in the Spanish mission in Havana, the Spanish news agency EFE reported. Nine sought refuge today, it said, and on Friday five entered the embassy. The four others sought refuge last week.

Spain says it will not expel the asylum-seekers and will try to negotiate their departure from Cuba.

Cuba calls all those who have sought refuge in the Spanish, Czech and Italian missions ''scum'' and habitual vagrants.

Spain's secretary of state for international cooperation, Luis Yanez, told reporters in Brussels on Thursday that Spain was suspending $2.5 million in direct grants-in-aid to Cuba, the country's total this year to the island that was a Spanish colony for 406 years until 1898.

While the sum is not substantial, another Spanish Foreign Ministry official hinted Friday that the move probably would not be the last to try to pressure the government of President Fidel Castro to grant more freedom to Cubans.

''More measures will be necessary,'' said Yago Pico de Coana, director general for Latin American affairs. He said it would be imprudent to elaborate.

Spain has also recalled its ambassador in Havana for consultations.

Cuba already has had to cope with a trade embargo by the United States and a loss of support from the Soviet Union and from East European countries that shed their Communist governments since last year.

Soviet President Mikhail S. Gorbachev, whose reforms Castro has criticized, is not as forthcoming on aid as in the past. Castro repeatedly has rejected Western-style balloting and said his country has no need for Soviet-style reform - despite pressure from Gorbachev.

As criticism of Cuba has appeared in official Soviet media, Castro has called on Cubans to brace for possible cuts in the Soviets' $5 billion in yearly aid.

U.S. sources last year said there had been substantial reductions already, as evidenced in the marked decline in the purchase of sugar, which the Soviet Union buys from Cuba at prices substantially higher than world market levels as a form of subsidy.

Castro also has lost his two closest Caribbean allies - Panama's Manuel Antonio Noriega, who was toppled in a U.S. invasion in December, and Nicaragua's leftist Sandinistas, who were defeated by a U.S.-backed opposition coalition in elections Feb. 25.

Yanez said the Spanish aid cutoff effectively severed Cuba's ''umbilical cord'' with Spain that afforded access to the European Community. He said resumption of the aid was contingent on ''the resolution of problems through political channels.''

Cuba has been attempting to reach some kind of aid agreement with the 12- nation West European trading bloc but without success.

A Spanish government spokesman, who is customarily not identified, denied that the decision to suspend aid represented a major shift in policy toward Cuba. He said the action was in keeping with remarks Prime Minister Felipe Gonzalez made to Castro in March about the need for the Marxist nation to move toward democracy.

Spain has maintained cordial ties throughout its own authoritarian and democratic administrations with the former colony.

Both Gen. Francisco Franco and the democratically elected administrations that have governed Spain since his death in 1975 have assured Castro easy credit to purchase Spanish goods and finance long-term projects.

Cuba's total commercial debt with Madrid is estimated at about $900 million, making Spain Cuba's second-most important creditor after the Soviet Union, to which Cuba owes an estimated $3 billion.

The conservative Madrid daily ABC, an outspoken opponent of both the Castro and Gonzalez governments, pointed out that Yanez's annoucement didn't affect Spain's soft-loan program to Cuba, for which $11 million are earmarked this year - nor its commercial credit and guarantee program designed to back up Spanish exports to Cuba. The Spanish Export Credit Insurance Co. held about $780 million in debts on exports to Cuba last year.

Cuba consumes 15 percent of Spain's trade to Latin America, according to Economy Ministry figures.