NEW YORK (AP) _ A loosely organized flotilla of nearly 200 sailing ships from around the world and hundreds of private pleasure boats sailed past the Statue of Liberty this morning, a preliminary to the OpSail parade of tall ships that will celebrate the Fourth of July.

Thousands of spectators along the eastern shore of Manhattan waved in appreciation as the ships, which had been moored in Long Island Sound, northeast of Manhattan, met under the Throgs Neck Bridge and headed down the East River.

The line of ships passed Gracie Mansion, where Mayor Edward I. Koch and 1,000 VIPs watched from the lawn as they dined on bagels and cream cheese.

Brooklyn's Gravesend Bay was the destination of the flotilla, once it slid past the United Nations and Lady Liberty.

The parade was serenaded by the American Wind Symphony, which was aboard the lead vessel, the barge Point and Counterpoint.

All the vessels are short enough to sail under the East River bridges, the last and lowest of which is the Brooklyn Bridge, with a 127-foot clearance.

The South Street Seaport, the museum in the shadow of the Brooklyn Bridge, was jammed with viewers, who cheered the ships and the blimps and helicopters swooping overhead in late morning breezes.

''It really makes you feel great to be an American,'' said Ellie Lapona of Norwood, N.J. Her family came from Switzerland and that of her husband, Vic, from Italy.

A red-shirted kayaker paddled along with the bigger vessels and private cabin cruiser and pleasure boats bobbed along in the wake of the stately barks, sloops and schooners and as they rounded Governors Island in New York's Upper Bay and swept under the Verrazano-Narrows Bridge to anchor in Gravesend Bay.

There they will lay await the great international review of tall ships and warships up the Hudson River past President Reagan on Friday.