for supporting sailing warships as a rearguard in fleet actions, similar to the duties performed by frigates outside the Mediterranean. They could assist damaged ships out of the line, but generally only in very calm weather, as was the case at the Battle of Málaga in 1704. They could also defeat larger ships that were isolated, as when in 1651 a squadron of Spanish galleys captured a French galleon at Formentera. For small states and principalities as well as groups of private merchants, galleys were more affordable than large and complex sailing warships, and were used as defense against piracy. Galleys required less timber to build, the design was relatively simple and they carried fewer guns. They were tactically flexible and could be used for naval ambushes as well amphibious operations. They also required few skilled seamen and were difficult for sailing ships to catch, but vital in hunting down and catching other galleys and oared raiders. Among the largest galley fleets in the 17th century were operated by the two major Mediterranean powers, France and Spain. France had by the 1650s become the most powerful state in Europe, and expanded its galley forces under the rule of the absolutist "Sun King" Louis XIV. In the 1690s the French galley corps (corps des galères) reached its all-time peak with more than 50 vessels manned by over 15,000 men and officers, becoming the largest galley fleet in the world at the time. Though there was intense rivalry between France and Spain, not a single galley battle occurred between the two great powers during this period, and virtually no naval battles between other nations either. During the War of the Spanish Succession, French galleys were involved in actions against Antwerp and Harwich, but due to the intricacies of alliance politics there were never any Franco-Spanish galley clashes. In the first half of the 18th century, the other major naval powers in the Mediterranean Sea, the Order of Saint John based in Malta, and of the Papal States in central Italy, cut down drastically on their galley forces. Despite the lack of action, the galley corps received vast resources (25–50% of the French naval expenditures) during the 1660s. It was maintained as a functional fighting force right up until its abolition in 1748, though its primary function was more of a symbol of Louis XIV's absolutist ambitions. The last recorded battle in the