Treaty of Fontainebleau (1762)

The Treaty of Fontainebleau was a secret agreement of 1762 in which the Kingdom of France ceded Louisiana to Spain. The treaty followed the last battle in the French and Indian War in North America, the Battle of Signal Hill in September 1762, which confirmed British control of Canada. In Europe, the associated Seven Years' War continued to rage. Having lost Canada, King Louis XV of France proposed to King Charles III of Spain that France should give Spain "the country known as Louisiana, as well as New Orleans and the island in which the city is situated." Charles accepted on November 13, 1762.
This agreement covered all of French Louisiana: the entire valley of the Mississippi River, from the Appalachians to the Rockies. The Treaty of Fontainebleau was kept secret even during the French negotiation and signing of the Treaty of Paris (1763), which ended the war with Britain.
The Treaty of Paris, made between France and Great Britain following the Seven Years' War, divided Louisiana at the Mississippi. The eastern half was ceded to Britain, and the western half and New Orleans were nominally retained by France. Spain did not contest Britain's control of eastern Louisiana, as it already knew that it would rule in western Louisiana. Also, under the Treaty of Paris, Spain had ceded Florida to Britain for which western Louisiana was its compensation.
The Treaty of Paris provided a period of 18 months in which French colonists who did not want to live under British rule could freely emigrate to other French colonies. Many of the emigrants moved to Louisiana, where they discovered later that France had ceded Louisiana to Spain.
The cession to Spain was finally revealed in 1764. In a letter dated April 21, 1764, Louis informed the governor, Jean-Jacques Blaise D'Abbadie, of the transition:
The colonists in western Louisiana did not accept the transition and expelled the first Spanish governor in the Rebellion of 1768. Alejandro O'Reilly, an Irish émigré, suppressed the rebellion. O'Reilly made good Spain's title by occupancy by taking formal possession in 1769 and raising the Spanish flag. 
The acquisition of Louisiana consolidated the Spanish Empire in North America. When Great Britain returned Florida to Spain in 1783, after the American Revolutionary War, Spanish territory completely encircled the Gulf of Mexico and stretched from Florida west to the Pacific Ocean, and north to Canada west of the Mississippi River.