After the American Revolution and the establishment of the United States, the new country was weak and divided. Its settlements were huddled sparsely against the Atlantic coast, it had no standing army or navy, and its economy was still stuck in a quasi-colonial relationship with Europe. The British refused to vacate forts around the Great Lakes in territory which they had technically ceded to the new state, Native Americans harassed the frontier (not without cause) and the Spanish were still in control of "the Floridas", comprising modern-day Florida, Alabama, Mississippi and parts of Louisiana. Since 1763, when France had been humbled in the Seven Years' War, Spain had also taken possession of a vast portion of the North American continent which was known as Louisiana (named after French King Louis XIV, see) but actually comprised much of the modern-day Midwest.
Having all of these European colonial powers still knocking about North America was extremely concerning for the U.S., given their opposition to its republican form of government and track record of interfering in U.S. affairs by inciting the Native Americans to violence or flirting with secessionist movements within the U.S. itself. Spanish control of the Midwest was also a block to what would later be known as Manifest Destiny, the spread of Americans across the North American continent. But worst of all was the fact the Spanish were bogarting the Mississippi River.
The Mississippi starts flowing in modern-day Minnesota and flows all the way down to the Gulf of Mexico, where the port of New Orleans marks its emergence. Given the extreme difficulty involved in exporting goods east over the Appalachian Mountains, the Mississippi was the economic lifeblood of the Midwest - without the right to ship agricultural products down it and into the Gulf of Mexico for export, the development of a vast part of North America would be impossible. Yet after the American Revolution, the Spanish Empire had refused the infant republic the right to ship goods down the river or to export them through New Orleans.
Seeing the Spanish as a decadent, lazy and cruel people who lacked the dynamism necessary to develop the continent, most Americans viewed their continued control of such important assets as not only offensive to their national interests but also a sort of crime against nature. The Spanish eventually gave the U.S. trans-shipment rights, then took them away again, then reinstated them, which was all rather confusing and no way to run a great continent. By the late 1790s, many Americans were extremely irritated at the situation, which made the future adherence of the Midwest to the U.S. questionable.
The irritating turned to the downright sinister when Spain ceded the Louisiana territory to Napoleon Bonaparte in a secret treaty in 1800. The Spanish might be lazy and feckless, but the French were something even worse - an aggressive, dynamic people who had the energy to spread across North America themselves and perhaps hem in the U.S. on the coast forever. As a French Army set out to take possession of Louisiana, panic spread across the U.S. political establishment.
Thomas Jefferson, sometimes portrayed as a reluctant and agonized expansionist, was actually a fervent believer in what would become known as Manifest Destiny. As I explain in my write-up on Jeffersonian democracy, Jefferson believed that for the U.S. to remain a healthy and republican country indefinitely, it needed to constantly acquire new land to support small yeoman farmers, which Jefferson saw as the only social basis for democracy. Aware that U.S. control of the shipment route into the Gulf of Mexico was the only way to realize his dream, he dispatched negotiators to Paris to arrange the purchase of New Orleans from the French. If there is any doubt as to his vehemence on the subject, read the letter he sent to his negotiators: "There is on the globe one single spot, the possessor of which is our natural and habitual enemy. It is New Orleans". He added that French possession of the city would lead the U.S. to ally itself with Britain and begin a massive ship-building programme; given that the U.S. had recently fought an undeclared naval war with France, and was now saying it might do so again, this amounted to little more than extortion.
Jefferson might have had to go through with his threat if it hadn't been for two lucky occurrences - firstly, the French Army was instructed to stop off on the way over the Atlantic at the French colony of Saint-Domingue, modern-day Haiti, for a stab at suppressing a slave revolt which had broken out there. Military disaster and yellow fever soon laid the French army low, and only a third of the force survived to limp home, dreams of a new French Empire in North America laying in ruins behind them. When they got home, they found that war had broken out between France and Britain again, and Paris desperately needed money with which to fight it. Jefferson's negotiators in Paris soon found themselves faced with an altogether more attractive offer than they had anticipated - the entire Louisiana territory for fifteen million dollars.
At something like 40 cents an acre in today's money, it was probably the best real estate deal in history. After some pro forma agonizing over whether the constitution allowed for such a deal, Jefferson charged ahead with it. The task of settling and developing the land thereby acquired would consume much of the country's energy for a half century to come. But the Midwest was now firmly attached to the republic. The seeds of future disaster, however, were contained in an afterthought - slavery, already established in Louisiana, was allowed to continue there and would soon be allowed to spread into some of the new territories acquired from the French, setting the stage for another momentous affair that nearly tore the republic apart.