The War of the Spanish Succession, waged between 1701 and 1714, was fought over whether the French Prince Philip of Anjou would be allowed to take the Spanish throne. Because this would join Spain and France, the powerful Austrian Empire claimed the Spanish throne for Archduke Charles of Austria.
King Charles II of Spain died in 1700 without an heir but left the throne of Spain to Philip of Anjou in his will. Austria, to counter this, created the Grand Alliance of England, Holland, Prussia and Austria. Eventually the allies of Austria realized that if Archduke Charles, who succeeded to the throne of Austria in 1711, also took the throne of Spain it would cause a great imbalance of power in Europe. They encouraged King Louis XIV of France to sue for peace, and he gained favorable terms in the 1713 Treaty of Utrecht. Prince Philip was allowed to take the Spanish throne provided France agreed that France and Spain would never be united.