You will be given a definition of a task first, then some input of the task.
In this task you will be given an answer to a question. You need to generate a question. The answer given should be a correct answer for the generated question.

The Kingdom of France controlled the Louisiana territory from 1699 until it was ceded to Spain in 1762. In 1800, Napoleon, then the First Consul of the French Republic, hoping to re-establish an empire in North America, regained ownership of Louisiana. However, France's failure to put down the revolt in Saint-Domingue, coupled with the prospect of renewed warfare with the United Kingdom, prompted Napoleon to sell Louisiana to the United States. The Americans originally sought to purchase only the port city of New Orleans and its adjacent coastal lands, but quickly accepted the bargain. The Louisiana Purchase occurred during the term of the third President of the United States, Thomas Jefferson. Before the purchase was finalized, the decision faced Federalist Party opposition; they argued that it was unconstitutional to acquire any territory. Jefferson agreed that the U.S. Constitution did not contain explicit provisions for acquiring territory, but he asserted that his constitutional power to negotiate treaties was sufficient.
Output:
what events led to the united states gaining the louisiana territory