Already, allies had joined the Dutch — the Elector of Brandenburg, the Emperor, and Charles II of Spain. Louis, despite the successful Siege of Maastricht in 1673, was forced to abandon his plans of conquering the Dutch and revert to a slow, cautious war of attrition around the French frontiers. By 1678, he had managed to break apart his opponents' coalition, and managed to gain considerable territories by the terms of the Treaty of Nijmegen. Most notably, the French acquired the Franche-Comté and various territories in the Netherlands from the Spanish. Nevertheless, the Dutch had thwarted the ambitions of two of the major royal dynasties of the time: the Stuarts and the Bourbons.