On Sunday - the last full day of the extravaganza - highlights included a coastguard exercise, a flypast by the Red Arrows and a firework display at night.
The event attracted around 120,000 visitors on Saturday, which included a march-past of all 3,000 members of the ships' crews.
The party atmosphere continued into the evening with an official captain's dinner and a rock concert.
An Italian navy ship won the first leg of the race from St Malo in France to the port of Greenock.
Second place went to the British ship Duet, owned by the English East Coast Sailing School and manned by a crew of 10.
Another British entry, The Greater Manchester Challenge, was placed fifth, with two Norwegian ships, Christian Radich and Statsraad Lemhkul, taking third and fourth place.
The event - organised by the International Sail Training Association - is expected to generate millions of pounds for the Inverclyde economy.
From Lerwick, the vessels headed to the finish at Aalborg in Denmark on 18 August.