No large all-galley battles were fought after the gigantic clash at Lepanto in 1571, and galleys were mostly used as cruisers or 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.