The last of the three separate treaties written in Vienna was the defensive military alliance between the Habsburgs and Spain. After Spain's severe loss in the War of the Quadruple Alliance (1717-1720) and weakening in the War of the Spanish Succession (1700-1714) the balance of power needed to be reset in Europe; and the Habsburgs believed making peace and fostering a new relationship with the Spanish would spark a realignment of control. Both army and naval support were guaranteed in the event of either nation being attacked by a foreign power.