The Louisiana Territory had been in the hands of Spain since the French and Indian Wars. However, the Spanish made no attempt to develop the area, and as a fading European power, they were in no position to maintain their presence there. So, the Spanish agreed to cede control of the Louisiana Territory to France.
This development caused considerable unease amongst Americans, even those such as Thomas Jefferson, who were traditionally sympathetic to French interests. Westward expansion had gathered steam by the early nineteenth century, with more and more American settlers taking advantage of the relative peace and stability, in the wake of the French and Indian Wars, to stake their claim in the new territories. Yet French control of the Louisiana Territory could jeopardize all that, potentially placing the United States on a collision course with a newly resurgent France under Napoleon.
But, as it turned out, the Americans needn't have worried. At that time, the French were preoccupied with a serious slave rebellion in Haiti, as well as preparing for war with Great Britain, so they agreed to sell what was becoming a growing financial and strategic burden to the United States. The United States eagerly accepted France's unexpected offer and agreed to buy the Louisiana Territory for the princely sum of $15 million (nearly $600 million in today's money).