18th century, and kept three Scots, one Walloon, and six Swiss regiments (including a Guard regiment raised in 1749) throughout the 18th century. The Scots regiments were contracted from Great Britain, but as relations between Britain and the Republic deteriorated, the regiments could no longer recruit in Scotland, leading to the regiments being Scots in name only until they were nationalized in 1784. Patrick Gordon, a Scottish mercenary fought at various times for Poland and Sweden, constantly changing his loyalty based on who could pay him the best, until he took up Russian service in 1661. In August 1689, during a coup d'état attempt in Moscow against co-tsar Peter the Great led by the Sophia Alekseyevna in the name of the other co-tsar, the intellectually disabled Ivan V, Gordon played the decisive role in defeating the coup and ensuring Peter's triumph. Gordon remained one of Peter's favorite advisers until his death. The Spanish Army also made use of permanently established foreign regiments. These were three Irish regiments (Irlanda, Hiberni and Ultonia); one Italian (Naples) and five Swiss (Wimpssen, Reding, Betschart, Traxer and Preux). In addition one regiment of the Royal Guard including Irishmen as Patten, McDonnell and Neiven, was recruited from Walloons. The last of these foreign regiments was disbanded in 1815, following recruiting difficulties during the Napoleonic Wars. One complication arising from the use of non-national troops occurred at the Battle of Bailén in 1808 when the "red Swiss" (so-called from their uniforms) of the invading French Army clashed bloodily with "blue Swiss" in the Spanish service. During the American Revolution, the British government hired several regiments from German principalities to supplement the Army. They became known to revolutionaries as Hessians and were portrayed by propagandists as mercenaries. However, they were auxiliaries and do not meet the definition of mercenary. 19th–21st centuries During the South American wars of independence from Spain, the British Legions from 1817 onward fought for General Simón Bolívar. Some of the British Legionaries were liberal idealists who went to South America to fight in a war for freedom, but others were the more classic mercenaries, mostly unemployed veterans of the Napoleonic wars, who fought for money. In South America, especially in Colombia, the men of the British Legions are remembered as heroes for their crucial role in helping end Spanish rule. During the First Carlist War, the British government suspended the Foreign Enlistment Act to