Cuba announced today that "all resistance" to U.S. forces by Cubans stationed in Grenada "has ceased" with the death of "all combatants of the last outpost."

An official communique released this afternoon said the Cuban Embassy in Grenada had informed Havana that the "the last enemy attack on our positions" involved "fighter planes, helicopters, artillery and mortars."

"At the end," the communique continued, six Cubans "embracing our flag, continued fighting . . . . [They] did not surrender and sacrificed themselves for the fatherland."

There was no official announcement of the exact number of Cuban casualties in the fighting against U.S. forces. U.S. Secretary of Defense Caspar W. Weinberger said in Washington that about 600 Cubans had been taken prisoner.

The announcement came several hours after President Fidel Castro told journalists that he had instructed the 700 Cubans on the small Caribbean island to continue fighting "as long as attacks against them continued."

At that time he said Cuba had not sent reinforcements to Grenada because of its estrangement from the new government there and the overwhelming U.S. military power in the Caribbean.

In a post-midnight news conference Castro also released texts of what he said were diplomatic communications among Cuba, Grenada and the United States. The notes indicated that both Cuba and the United States had expressed a wish to avoid a confrontation on Grenada.

Measuring his words carefully, Castro stressed that Cuba had said it would not interfere in an effort to evacuate U.S. citizens from Grenada. But he added that his country would not renege on its commitment to the government of prime minister Maurice Bishop who was killed in a coup last week. Castro appeared to be surprised at the magnitude of the U.S. action.

In Havana, radio and television carried continuous emergency broadcasts on events in Grenada.

The news came as the first of what is expected to be a crescendo of anti-U.S. demonstrations took place in Havana.

Security around the U.S. special interests section was beefed up suddenly early this afternoon following a bomb threat.

Castro said at the early morning news conference with almost 100 foreign and local journalists that the large majority of the 700 Cubans in Grenada were construction workers, "as is proved by the excellent airport they built for U.S. planes to land on." He said about 40 were military advisers.

Castro said that as far as he knew the only Soviet citizens on the island were a "small number of diplomats."

At noon, thousands of university and secondary school students gathered to protest near the cemetery where casualties from the U.S.-sponsored invasion at the Bay of Pigs were buried 22 years ago.

In his two-hour meeting with reporters this morning, Castro read what he said were a series of diplomatic exchanges that occurred during the three days preceding the U.S. invasion of Grenada and on the first day of the invasion.

Messages sent by the United States and Cuba make carefully explicit each side's intention to do everything possible to avoid a confrontation.

According to the version of the diplomatic exchange made public by Castro, the Cuban government gave the U.S. interests section in Havana a message Saturday evening that said: "We know of your concern for U.S. citizens in Grenada . . . . It is convenient for us to remain in contact regarding this to cooperate in any difficulty that may arise and that any measure regarding these persons' safety may be favorably resolved without violence and without intervention in the country."

The U.S. communique read by Castro told the Cuban government that the United States "will make every effort to guarantee the safety" of Cuban citizens.

Unfortunately, Castro said, the U.S. message was delivered at 8:30 yesterday morning, 1 1/2 hours after fighting broke out.

A U.S. source here confirmed the exchange of messages, but said the interest section's telephone lines were "down from Sunday evening until late Tuesday night." He said that communication was established early Monday morning through a resdential telephone line and that the U.S. message to Cuba was transmitted then.

White House spokesman Larry Speakes said in Washington said the U.S. disregarded Cuban and Grenadan assurances that U.S. citizens in Grenada would be safe because, "It was a floating crap game and we didn't know who was in charge."

Cuba today released the text of a moderately worded note to the United States criticizing the intervention, which it said came with no warning, and saying the "Cuban chief in Grenada has instructions to receive any emissary that approaches him, listen to his opinions and transmit them to Cuba." It said the fighting would be "a costly moral defeat to the United States, the most powerful country in the world, tangled up in a war with one of the smallest states on the planet."

Castro said that the group of Grenadans who overthrew Bishop Oct. 13 requested military assistance from Cuba last week when U.S. troop mobilizations in the area began.

Castro read from the instructions relayed to the Cuban diplomatic mission on Saturday: "If the Yankees disembark in the airstrip landing next to the university and in the university surroundings to evacuate their citizens, refrain from interfering."

The Cuban diplomats were also told to tell the group of radicals who took power upon the overthrow and apparent execution of Bishop that the sending of Cuban reinforcements was "impossible and unthinkable." Castro did not make clear with whom in the new ruling group his government had contact.

The alleged mastermind of the coup, Deputy Prime Minister Bernard Coard, has not been heard from since the overthrow of Bishop began. The head of the Grenadan Army, Gen. Hudson Austin reportedly became the leader of the new government.

While he would not send reinforcements, Castro stressed again and again that "once the advance of powerful U.S. naval forces toward Grenada was announced, it became morally impossible to think of evacuating Cuban personnel from Grenada."

Castro repeatedly expressed his government's view that backing down or giving in to U.S. pressure is both dangerous and dishonorable.

"Organizing an immediate evacuation of our personnel as U.S. warships are approaching would be highly demoralizing and shameful for our country in the face of public opinion," Castro wrote to the Cuban diplomats in Grenada.

Castro, 57, who looked unusually tired, bitterly criticized the organizers of the coup against Bishop for "divorce from the people," and seemed resigned to Grenada's becoming "an occupied and invaded country where we have nothing to do."

He added that because of Bishop's overthrow "the worst possible conditions exist to organize a solid and efficient resistance against the invaders. Without popular participation it would be practically impossible."

Young Cubans gathered in large numbers near Havana's ornate 19th century cemetery. Under a persistent drizzle they chanted slogans against President Reagan and expressed their willingness to "fight on any front" their leaders' may decide.

Throughout the day few Cubans expressed fear of an imminent danger of a U.S. military action here.

"We have to tell Reagan to draw the line somewhere. That's why the militias have to fight, but he's not crazy enough to invade us," said Miriam Leon Nunez, a medical student from Havana University.