NEW YORK (AP) _ Four of five Iranian stowaways on a Panamanian freighter jumped into New York Harbor after they were discovered early today and tried to swim to shore, authorities said.

Police spokesman Sgt. Raymond O'Donnell said it was believed the men were soldiers.

The swimmers were rescued by the Coast Guard within minutes of hitting the 39-degree water near Staten Island. The fifth man was taken into custody by the Port Authority police in Newark, N.J., officials said.

All five were handed over to the Immigration and Naturalization Service, officials said.

Coast Guard spokesman Robert Levalley said the Coast Guard was handling the incident as an asylum case.

The four Iranians jumped from the Estoril, a freighter which was heading to Port Newark from Istanbul, Turkey, said Coast Guard Petty Officer Michael Schultz.

Schultz said the men, whose ages range from 27 to 23 years old, jumped overboard at 4:43 a.m. when the ship was about a quarter-mile north of the Verrazano Narrows Bridge, after the captain of the ship discovered them in a baggage compartment.

Levalley said the captain confiscated the men's Iranian passports.

The men were wearing work clothes and had tossed a plastic bag filled with other clothes into the water before them, Schultz said.

''The pilot of the ship saw them jump in the water and immediately radioed the Coast Guard,'' he said. ''For some reason, one guy refused to jump.''

A cutter, Hawser, was on the spot within 20 minutes and picked up the men, Schultz said. ''They're all healthy although they're a little cold,'' said Schultz. ''One of them speaks excellent English.''

Levalley said the men were awaiting an interview by the INS officials.

O'Donnell identified the jumpers as Framan Abbasi, Mohsen Mohar Erzdeh, Kord Ali Mosleni and Yusuf Tapai. The man who remained on board was identified as Reza Ahadi, 27.