On attaining his majority at the age of 21 in 1262, Alexander declared his intention of resuming the projects on the Western Isles which the death of his father thirteen years before had cut short. He laid a formal claim before the Norwegian king Haakon. Haakon rejected the claim, and in the following year responded with a formidable invasion. Sailing around the west coast of Scotland he halted off the Isle of Arran, and negotiations commenced. Alexander artfully prolonged the talks until the autumn storms should begin. At length Haakon, weary of delay, attacked, only to encounter a terrific storm which greatly damaged his ships. The Battle of Largs (October 1263) proved indecisive, but even so, Haakon's position was hopeless. Baffled, he turned homewards, but died in Orkney on 15 December 1263. The Isles now lay at Alexander's feet, and in 1266 Haakon's successor concluded the Treaty of Perth by which he ceded the Isle of Man and the Western Isles to Scotland in return for a monetary payment. Norway retained Orkney and Shetland until 1469 when they became a dowry for James III's bride, Margaret of Denmark.