Thirty illegal immigrants from China who crossed the Pacific in specially outfitted cargo containers were arrested when they emerged from their hiding places after the boxes were unloaded.

Twenty-one people were detained at the Port of Long Beach and nine others were arrested at neighboring Los Angeles Harbor. Officials were trying to determine today whether the two smuggling attempts were related.

"It wasn't a traditional rite of passage where they come over in a broken boat. This was a very sophisticated operation," said Rosemary Melville, deputy district director of the Immigration and Naturalization Service in Los Angeles.

The groups traveled in "soft top" containers--canvas-covered boxes about the size of a tractor-trailer. The containers were equipped with food, water, battery-powered lights, portable toilets, cellular telephones and ladders for climbing out. Pacific crossings typically take 10 to 12 days.

The smaller group arrived in Los Angeles Harbor on Christmas aboard the Danish ship OOCL Netherlands. Harbor police spotted a stowaway on the dock Tuesday. That person led police to the container.

That night, a worker at the Maersk terminal in Long Beach spotted Chinese immigrants wandering around. Guards took seven women, 12 men and two boys into custody.

They had been in a container that arrived Christmas Eve aboard the MS Sine Maersk and was unloaded onto a trailer.

"They were in relatively good health," said Art Wong, a port spokesman. "They had ski jackets and parkas. They wore jeans or khakis."

The immigrants, most of whom apparently were from Fujian Province, had duffel bags filled with personal items, and some had portable tape players for entertainment during the journey.

The ships' crews were not suspected of any involvement, Melville said. Wong said it would be unlikely for anyone to discover the stowaways during the crossing.

Melville said two of the immigrants said they were each charged $50,000 by smugglers and had paid $5,000 in advance for the voyage.

Smugglers have used soft-top containers to smuggle immigrants to other West Coast ports. After 19 people were found in a container shipped to Tacoma, Wash., in April, an INS official said it was part of a troubling trend.