The alliance of Portugal with Spain meant that Portuguese colonies became targets for the Netherlands, which was embroiled at the time in a lengthy struggle for its independence from Spain, the Eighty Years' War. After the Dutch East India Company was founded in 1602, the Dutch unsuccessfully attacked Macau several times, culminating in a full-scale invasion attempt in 1622, when 800 attackers were successfully repelled by 150 Macanese and Portuguese defenders and a large number of African slaves. One of the first actions of Macau's next governor, who arrived the following year, was to strengthen the city's defences, which included the construction of the Guia Fortress.