The War of the Spanish Succession arose after the establishment on the Spanish throne of a House of Bourbon king, following the extinction of the Spanish Habsburg line. The internal division between supporters of a Habsburg and those of a Bourbon king led to a civil war and ultimately to the loss of Sicily, Sardinia, Menorca and Gibraltar. Gibraltar and Menorca were captured by Anglo-Dutch forces fighting under the Spanish flag of Habsburg contender Charles VI. Menorca was ultimately surrendered to Spain years later. At the end of the War of Spanish Succession, Spain's possessions in the Low countries and mainland Italy were ceded to Austria.