Spain secretly acquired the territory from France near the end of the Seven Years' War by the terms of the Treaty of Fontainebleau (1762). The actual transfer of authority was a slow process, and after Spain finally attempted to fully replace French authorities in New Orleans in 1767, French residents staged an uprising which the new Spanish colonial governor did not suppress until 1769. Spain also took possession of the trading post of St. Louis and all of Upper Louisiana in the late 1760s, though there was little Spanish presence in the wide expanses of the "Illinois Country".