Other nations took several actions to limit Spain's power, including forming alliances and engaging in military conflicts. For example, England and the Dutch Republic formed an alliance against Spain in the late 16th century, and the British defeated the Spanish Armada in 1588. Additionally, France fought against Spain in several wars during the 17th and 18th centuries, and Portugal gained its independence from Spain in 1640.