How did Spain lose their right to New Orleans?

The Spanish did not lose their right to New Orleans. Rather, the territory passed from Spain to France with the secret Treaty of Fontainebleau in 1800, and then from France to the United States with the Louisiana Purchase in 1803.
Copyright Wanderlust World © https://www.ynyoo.com