and Dutch. In 1706, the Elector of Bavaria was deprived of his offices and titles for siding with Louis against the Empire. The following year, George was invested as an Imperial Field Marshal with command of the imperial army stationed along the Rhine. His tenure was not altogether successful, partly because he was deceived by his ally, the Duke of Marlborough, into a diversionary attack, and partly because Emperor Joseph I appropriated the funds necessary for George's campaign for his own use. Despite this, the German princes thought he had acquitted himself well. In 1708, they formally confirmed George's position as a Prince-Elector in recognition of, or because of, his service. George did not hold Marlborough's actions against him; he understood they were part of a plan to lure French forces away from the main attack. In 1709, George resigned as field marshal, never to go on active service again. In 1710, he was granted the dignity of Arch-Treasurer of the Empire, an office formerly held by the Elector Palatine; the absence of the Elector of Bavaria allowed a reshuffling of offices. The emperor's death in 1711 threatened to destroy the balance of power in the opposite direction, so the war ended in 1713 with the ratification of the Treaty of Utrecht. Philip was allowed to succeed to the Spanish throne but removed from the French line of succession, and the Elector of Bavaria was restored. Accession in Great Britain and Ireland Though both England and Scotland recognised Anne as their queen, only the Parliament of England had settled on Sophia, Electress of Hanover, as the heir presumptive. The Parliament of Scotland (the Estates) had not formally settled the succession question for the Scottish throne. In 1703, the Estates passed a bill declaring that their selection for Queen Anne's successor would not be the same individual as the successor to the English throne, unless England granted full freedom of trade to Scottish merchants in England and its colonies. At first Royal Assent was withheld, but the following year Anne capitulated to the wishes of the Estates and assent was granted to the bill, which became the Act of Security 1704. In response the English Parliament passed the Alien Act 1705, which threatened to restrict Anglo-Scottish trade and cripple the Scottish economy if the Estates did not agree to the Hanoverian succession. Eventually, in 1707, both Parliaments agreed on a Treaty