Defense Secretary Caspar W. Weinberger said American troops had encountered more resistance than expected from Cuban and local Marxist forces in Grenada and may have to stay on the island for weeks or longer while fighting is quelled and a new government is established.

"I hope we're talking about days or weeks," Weinberger said. "If we can get the new government under way with the neighboring Caribbean countries that asked us in, then it can go even faster."

Six helicopters successfully evacuated students surrounded by hostile forces at the oceanside campus of the St. George's School of Medicine yesterday, and Weinberger announced that all of the more than 600 medical students on the island "are safe and out."

Even so, no one in the Reagan administration was willing to set a timetable for withdrawal of the nearly 3,000 U.S. troops now in Grenada. They said six Americans had been killed and more than 600 Cubans were captured in the invasion, which already was taking more time than expected.

Late last night, the Pentagon said all of the 33 U.S. servicemen wounded in the battle have been flown to hospitals in the United States and Puerto Rico. Most are at Fort Bragg, N.C., and Charleston Air Force Base, S.C., officials said.

The administration encountered strong criticism from the representatives of Grenada and 15 other Latin American countries at a meeting of the Organization of American States, as well as from some Democrats who questioned whether it was necessary.

Administration officials yesterday acknowledged receiving assurances from the military junta that took power in Grenada earlier this month that the more than 1,000 American residents there were not in danger.

However, the officials said they hadn't believed the junta leaders and justified the invasion on grounds that the island's unstable government was a "floating crap game" that still could have endangered the Americans, most of whom were students at the medical school and retirees.

Gen. John W. Vessey Jr., chairman of the Joint Chiefs of Staff, told reporters at a Pentagon news conference with Weinberger that the operation was "successful so far" but that "we encountered a lot more resistance than we expected." Pentagon sources said they believed "senior military advisers" and other armed personnel from Cuba arrived in Grenada several days ago in anticipation of possible U.S. military action.

During the dramatic, nationally televised news conference late yesterday afternoon, which followed a day of official silence on details of the invasion, an aide handed Vessey a note saying the Grand Anse campus, one of the two major remaining pockets of resistance, had been overtaken and its students evacuated by helicopter.

Weinberger and Vessey said fighting continued between U.S. forces and Cuban and Grenadan combatants at Richmond Hill, just east of the capital of St. George's, the site of an island prison where Weinberger said there may be political prisoners. Vessey also said that additional pockets of resistance may be encountered as U.S. forces try to consolidate their control over the island.

Weinberger said the United States wants to return all Cuban prisoners, including a colonel captured yesterday, to Havana. But he said U.S. officials had not yet been able to make arrangements with Cuba.

Administration officials said the Cuban government sent a cable to Washington yesterday pleading for the safety of its citizens, even as Radio Havana was urging them not to surrender. U.S. officials responded that the United States had no desire to fight the Cubans in Grenada and urged Cuban leader Fidel Castro to order their surrender.

Later in the day, when Radio Havana announced that Cuban resistance had ceased, Weinberger said that "some of the Cubans on the island don't seem to have heard that." Vessey said Cuban forces had opposed U.S. troops with small arms, machine guns, anti-aircraft cannons and anti-tank rockets.

Pentagon officials also said yesterday that they believed the Cubans had sent "senior military advisers," field artillery and other military men to Grenada during the weekend in anticipation of a possible invasion. Vessey said the United States had expected to find only 500 Cubans in Grenada, most of them construction workers, and had been surprised by the size and well-armed intensity of the Cuban resistance.

Administration officials had said they thought most of the Cubans were helping to build a 9,000-foot runway at Point Salines on the southern tip of Grenada. That airport, which administration officials said could be used as a refueling stop for Soviet and Cuban planes shipping arms elsewhere in the world, had originally triggered Reagan's concern about the potential threat to U.S. security by the Marxist government in Grenada.

U.S. forces encountered a Cuban transport plane at one airport and a Cuban ship, called the Vietnam Heroic, in port in St. George's.

Weinberger, who repeatedly stressed that most opposition was coming from Cubans, said U.S. forces had "overrun and taken" what he called a Cuban military and communications installation, capturing radios, "secret documents" and the Cuban colonel. He said the installation was near Frequente in the south of the 133-square-mile island.

The defense secretary again declined to say specifically when American troops might be removed from Grenada. "We want to withdraw as many of our troops as we possibly can," he said.

He said establishing a procedure for installing a new Grenadan government would be the primary responsibility of the six small Caribbean nations that joined the United States in the invasion. But, he said, "We will certainly try to help them," indicating that at least some U.S. forces may remain on the island while the new government is formed.

"We don't plan to stay a minute more than we have to to get a government that is chosen by the people back into authority," Weinberger said on NBC's "Today" show.

The administration's plan is for the British Commonwealth country's governor general, Sir Paul Scoon, to be restored to power to establish a provisional government leading to elections. Reagan said restoration of "democratic institutions" on the island was a major U.S. objective in the invasion.

Yesterday, Scoon, who is appointed by Queen Elizabeth II, was taken by American forces in an armored personnel carrier from his home on the island, where Weinberger said he had been "a complete prisoner in his residence." Scoon was airlifted to the helicopter carrier USS Guam, Weinberger said.

"I think it's fair to say he was extremely pleased," Weinberger said. "He forgot some of his British reserve and said he was glad to be out."

It remained unclear yesterday how long it would take to reach the president's stated goal of restoring democracy on the island. White House counselor Edwin Meese III said in a speech in Colonie, N.Y., that elections could be held in three to six months, although U.S. forces might be withdrawn before that.

Weinberger said additional troops stood ready to reinforce those now in Grenada, but said he did not believe they would be needed. Hundreds of soldiers from the 82nd Airborne Division at Fort Bragg were flown in yesterday to guard airports and other territory that U.S. Army Rangers and Marines had captured.

Some of the Marines who landed by helicopter at Pearls Airport in northeastern Grenada early Tuesday returned to their ships, although Pentagon officials suggested that some of them may have been flown back to the island again for combat elsewhere. Administration officials said they were confident that the Marines and their five-ship amphibious landing force would be able to leave Grenada fairly soon and return to their original mission of replacing the Marines now in Beirut.

It was also learned yesterday that Navy Seals, the elite force trained in counterinsurgency and other special missions, had landed in small boats in Grenada in the predawn hours Tuesday. The Seals reportedly were used to infiltrate enemy lines in preparation for the Ranger and Marine assault.

Weinberger said the unexpectedly large contingent of Cubans taken prisoner in the invasion presents a "difficult logistical problem." The Cubans are being held at the airports and possibly at the racetrack, Weinberger said. But military officials had not prepared facilities for handling such a large number of prisoners. A task force of the Joint Chiefs of Staff met yesterday to devise a solution.

Another unanswered question was the status of 20 to 30 Soviet citizens on the island. Weinberger, who described the contingent as "embassy people, spies, KGB people," said U.S. forces have not encountered the Soviets yet, while Vessey said they are probably ensconced in the Soviet Embassy.

Asked whether the medical students had been held hostage, the defense secretary said it was "impossible" for those at a second medical school campus to leave and "they couldn't go in or out of the building without getting killed." He described as the "best news of the day" the message handed to Vessey during the news conference saying that all students at the school were evacuated without any being killed.

"Of course, if that had been a group of empty buildings, we would have taken it last night," he said, suggesting U.S. forces had to move cautiously to avoid bringing the students under fire from either side.

Vessey said U.S. forces were instructed to avoid civilian casulties as much as possible. But he and other officials could provide no estimates of the number of Cubans or Grenadans killed or wounded.

The invasion, which one senior official said was code-named "Urgent Fury," was described by Weinberger yesterday as proceeding "extremely well."

"We have not fulfilled all of the objectives, but we believe that we will before very much longer," he said. Pentagon officials had said Tuesday that they hoped the operation would be complete within a day.

The White House shed new light yesterday on the events that preceded the invasion, including an exchange of diplomatic messages with the Marxist military junta that consolidated its power last week after the execution of Prime Minister Maurice Bishop.

White House spokesman Larry Speakes told reporters that two teams of two U.S. consular officials each from the U.S. Embassy in Bridgetown, Barbados, had traveled to Grenada just before the invasion. Only one of the diplomats returned to Barbados before the invasion, he said, refusing to comment on whether the others had helped plan it.

Speakes said the diplomats met with one member of Grenada's 16-member military council and expressed concern about the safety of American citizens on the island. Speakes said the diplomats left with their concerns reinforced about U.S. citizens' safety.

Speakes reported that the United States had received a "diplomatic note" from the military junta at 2 a.m. Monday, Oct. 24. He said the note may have been signed by Major Leon Cornwall, a member of the council, and may have been delivered by him. He did not dispute reports that the note offered reassurances that U.S. citizens on the island were not in danger and would be given safe passage out.

The administration, Speakes said, "didn't believe anything coming out of there. It was a floating crap game and we didn't know who was in charge and I don't think they knew who was in charge." Despite the reported assurances of safe passage for the Americans, Speakes said that "the fact remains no commercial or chartered aircraft was allowed in or out."

Reagan signed the directive for the invasion at 6 p.m. Monday evening, according to Secretary of State George P. Shultz.

Six hours later, the administration responded to the diplomatic note from Grenada by sending a commercial telex. It could not be learned whether anyone on the island ever acknowledged receiving the cable, which, according to Speakes, told Grenadan officials that the United States could not respond to their message but again expressed concern for the safety of Americans.

Weinberger said yesterday that the U.S. forces had not encountered or communicated with any members of the junta since the invasion began.