Although Spain nominally gained control of Louisiana according to the secret Treaty of Fontainebleau in 1762, the first Spanish governor of the territory, Antonio de Ulloa, arrived in New Orleans only in March 1766.[9] Ulloa did not rule for long, however, and was expelled from New Orleans by French colonists in the Louisiana Rebellion of 1768.[10] He was replaced as governor by Alejandro O'Reilly, who suppressed the rebellion and who appointed Don Pedro Piernas as lieutenant governor of upper Louisiana in August 1769.[11] The French commandant of the village, St. Ange, transferred formal control to Piernas on May 20, 1770, and St. Ange was named assistant to Piernas and special adviser on Indian affairs.[12] After the transfer, Piernas confirmed St. Ange's and Laclède's land grants and rented Laclède's headquarters as government offices, and Spanish soldiers provided local security.