Peru today prepared to evacuate the first group of refugees from Cuba amid continued uncertainties surrounding the eventual resettlement of thousands of Cubans camping on the ground of the Peruvian Embassy in Havana.

At the same time, diplomats here said that President Fidel Castro's puzzling decision to permit the exodus of discontented Cubans, and the massive number who seek to leave, could damage both his relations with Latin nations and his supporters throughout the hemisphere.

But unless all the refugees are quickly resettled, the potential "black eye" for Castro could turn into a major embarrassment for Peru, the United States and the rest of the noncommunist world, according to Peruvian Foreign Minister Carlos Garcia Bedoya.

Peru has chartered jets to pick up 300 of the total 1,000 Cubans the Peruvian government has decided to admit into the country. Spain has indicated readiness to admit 500 Cubans, and Costa Rica 300. The United States, after initially saying that the refugee problem should be resolved by Peru and Cuba, yesterday said it was willing to resettle between 2,000 and 5,000 refugees.

This still leaves 4,000 to 7,000 of the 10,800 refugees Peru says it has registered with no place to go, according to Peruvian diplomats in Havana. U.S. diplomats privately have criticized Latin countries for their slow response to the critical situation. (Cuban authorities claim that there are no more than 4,000 persons seeking asylum.)

Failure to resettle them "would mean that the fate of these people who want to run away from Castro have no place to go," said Walter Montenegro, Boliva's ambassador to Peru. "This would confirm the inability of the West to provide for thousands of Cubans who have rejected communism in favor of democracy."

Peru issues an urgent appeal to the Intergovernmental Committee on European Migration yesterday to help with the evacuation effort and the committee issued an urget appeal to Western countries to commit themselves to specific numbers of refugees they are willing to take. So far, however, there had been no response.

Quite aside from the potential political embarrasment to the West of leaving some 8,000 regugees stranded much longer in the Peruvian Embassy in Havana, the physical and psychological situation within the embassy had, by yesterday, become desperate and explosive.

Cesar Hildebrandt, an editor of Lima's Caretas magazine who was among a group of Peruvian jounralists allowed to enter Cuba Thursday, reported yesterday that there was not enough food, medicine or sanitary facilities at the embassy and that the violence that earlier in the week exploded among the refugees was threatening to turn against the Peruvian diplomats in charge. t

Cuban radio, Hildebrant reported, was broadcasting continuing messages that the refugees were free to leave Cuba but that the Peruvians had been unable to arrange for their departure. Cuban radio did not report that the Cuban government had refused to allow the U.N. High Commissioner for Refugees to participate in the effort, leaving the Cubans inside the embassy to think that Peru alone was responsible for the slowness of the evacuation effort.

An official Peruvian government communique issued last night said that the refusal of the Castro government to allow international agencies to participate "had worsened even more the difficult conditions of the people in the Peruvian Embassy and has torpedoed methods to arrange for the fastest exit of these people" from Cuba.

"You can't imagine what it is like here, Hildebrandt said. La Prensa, a newspaper that also got a reporter into Cuba, said today that the situation in the embassy "borders on hysteria."

While the unpleasant situation at the embassy may be relieved by concerted international action, the current dispute has damaged Cuba's relations with much of the rest of Latin America as well as Cuba's image as a model of leftist revolution, in the view of diplomats and even the leftist press here.

Apart from the refugee issue, Cuba's recent statements recalling the "cowardice" of Latin governments that helped isolate Cuba during the 1960s at the behest of the United States have angered Latin governments -- such as Peru -- that had reestablished diplomatic and trade ties with Castro in the past decade in defiance of Washington.

This has reminded Latin governments, most of them under conservative military or civilian rule, that Castro never forgave them for their attitudes in the 1960s and still views them more with hostility and suspicion than as friends.

Both Peru and Venezuela have not ruled out the possibility of breaking diplomatic relations entirely with Cuba over the affair and, according to diplomats here, it is unlikely that Bolivia's civilian government will now be able to reestablish diplomatic ties with Castro, as the elected Congress in La Paz has been urging.

U.S. diplomats here have told friends they view the situation as extremely favorable for the United States because Cuba has discredited itself and leftists in other Latin countries who hold up Cuba as a model. Even leftist publications such as Amauta in Lima have not bought Castro's line that the refugees streamed into the Peruvian Embassy because of a CIA plot.

Thursday, the five Andean Pact countries, (Peru, Venezuela, Columbia, Ecuador and Bolivia) issued a statement condemning Cuba for the incident, charging that it had defied international law by withdrawing security from the Peruvian Embassy and holding Cuba responsible for the affair.

Nonetheless, from a strictly legal point of view, Cuba has grounds to insist that the refugees who entered the Peruvian Embassy by force are not automatically entitled to political asylum. Cuba never ratified the 1954 Caracas Convention, according to diplomats here, which says that it is solely up to the government that refugees are asking asylum of to decide whether to grant it.

Instead, Cuba and Peru have an older treaty, still in effect, stating that both governments must agree before a person who asks for asylum receives it. This treaty has been largely forgotten in the current dispute.

Not even the Peruvian left, however, is attempting to use this treaty to justify Cuba's decision last weekend to open the floodgates and allow thousands of Cubans to become wards of Peru. Some leftist journalists here are blaming the whole affair on the CIA and the United States, but the independent left, reflected by Amauta, is clearly worried.

"The consequences of the [Cuban] attitude have already begun to be felt," Amauta said this week. "They have produced the isolation of Cuba accompanies by great international discredit. This could result in a realignment of forces especially prejudicial to countries like Nicaragua and the people of El Salvador interested in support from the Andean group.

"And it could allow the most reactionary sectors in the international arena to win," Amauta said. "Finally, it facilitates the anticommunist campaign in Peru in the middle of an electoral process."