The Portuguese Revolt was partially what led Spain to conclude peace with France in 1659. But the government had gone bankrupt again in 1647 and 1653, and the nobility wouldn't give an inch on financial and tax reforms. Portuguese victories in 1663 at Ameixial and in 1665 at Vila Viçosa secured their independence, and in 1668 Spain recognized Portugal's sovereignty.