Spain gave Louisiana back to France in a secret treaty signed at San Ildefonso. The territory stretched from the Gulf to Canada—828,000 square miles. France held it for three years. Napoleon needed cash for his wars and sold the entire thing to the United States for $15 million. Spain had traded away half a continent for a promise of an Italian throne that never materialized.