Query: In what year did the United Provinces become a confederacy?
Context: However, the latter agreed to turn the United Provinces into a protectorate of England (Treaty of Nonsuch, 1585), and sent the Earl of Leicester as governor-general. This was unsuccessful and in 1588 the provinces became a confederacy. The Union of Utrecht is regarded as the foundation of the Republic of the Seven United Provinces, which was not recognized by the Spanish Empire until the Peace of Westphalia in 1648.