Medieval fleets, in France as elsewhere, were almost entirely composed of merchant ships enlisted into naval service in time of war, but the early beginnings of the French naval history goes back to that era. The first battle of the French Navy was the battle of Arnemuiden (23 September 1338), where it defeated the English Navy. The battle of Arnemuiden was also the first naval battle using artillery. It was later defeated by an Anglo-Flemish fleet at the Battle of Sluys and, with Castilian help, managed to beat the English at La Rochelle—both battles playing a crucial role in the development of the Hundred Years War. However, the navy did not become a consistent instrument of national power until the 17th century with Louis XIV. Under the tutelage of the "Sun King," the French Navy was well financed and equipped, managing to resoundingly defeat a combined Spanish-Dutch fleet at the Battle of Palermo in 1676 during the Franco-Dutch War, although, along with the English navy, it suffered several strategic reversals against the Dutch, who were led by the brilliant Michiel de Ruyter. It scored several early victories in the Nine Years War against the Royal Navy and the Dutch Navy. Financial difficulties, however, allowed the English and the Dutch to regain the initiative at sea.