A U.S. Navy launch loaded with sailors and Marines returning from weekend leave collided with a Spanish freighter and capsized in early morning darkness in Barcelona harbor today, killing at least 24 American servicemen.

Another 23 men were reported in hospitals with injuries and hours later a U.S. Navy spokesman said 10 to 25 men were still unaccounted for. He said they had not necessarily been aboard the launch and might still be on leave. No roll call was made as men boarded the launch, he said.

An even greater tragedy was averted when Spanish tugboats sped to the scene and righted the overturned 56-foot launch, finding more than a dozen men hanging on for their lives in a 1 1/2-foot airspace below the inverted deck.

The Navy withheld the identities of the victims pending notification of next-of-kin, expected to be completed within 24 hours. There were no reports of injuries aboard the 380-ton Spanish coastal freigher Urela.

The sailors were going back to the helicopter carrier U.S.S. Guam and the amphibious dock U.S.S. Trenton, both based in Norfolk, Va., and attached to the U.S. Sixth Fleet in the Mediterranean. The accident occurred at about 2:20 a.m. as the launch was just pulling out and rounding a pier.

"We saw a ship coming at us suddenly and it kept coming," said Marine Cpl. Herb Braxton, 22, of Camden, N.J. "People started to yell, 'Dammit, watch out,' but the ship kept coming."

"The bump didn't do much damage but the ship just kept on coming into us and that's what turned us over," Braxton said.

A nonswimmer, he was one of the those trapped under the launch when it rolled over. Scores of others who were dumped into the dark, 50-degree waters swam to safety.

"It was a nightmare but there was not any real panic except for a couple of guys," said survivor Richard Felzien, a 1st class petty officer from Norfolk, who was being treated for shock in a Barcelona hospital.

Marine Cpl. Tyrone Crosby of Cleveland said that after the launch flipped over he had hold of a buddy's arm "but he just got away."

As night fell Monday, Navy officers said they thought all the bodies had been recovered, but Spanish frogman continued to search the harbor's waters. The Guam and the Trenton, on a goodwill visit to this Mediterranean port, were anchored in the outer harbor only a few minutes away.

Navy officials said the launch, with a crew of three to five men, normally carries 110 to 120 persons and was not oveloaded. Survivors said the boat was commanded by an officer. The U.S. and Spanish navies began investigations.