The centre of Spanish military power shifted dramatically in the early 18th century. The War of the Spanish Succession (1701–1714) was both a civil and international war in which the French backed the Bourbon contender for the Spanish throne and an alliance led by Austria, the Netherlands and Britain backed the Habsburg contender while a divided Spain fought on both sides. The war secured the Spanish throne for the Bourbon Philip as Philip V of Spain at the Peace of Utrecht but in the war's settlement, Spain had to give up the Spanish Netherlands, Naples, Milan, Sardinia, Sicily, Gibraltar and Menorca to the Habsburg allies. Spain's defeat by the combined alliance of France, Britain, the Netherlands and Austria in the War of the Quadruple Alliance (1718–1720) confirmed the decline from her former dominance, whilst the successful deployment of the Britain's Royal Navy into the Mediterranean, by exploiting the fortress of Gibraltar, gained in 1704 by an Anglo-Dutch force during the war of succession, would create considerable difficulties in the following years.