In 1763, Louisiana was ceded to Spain around New Orleans and west of the Mississippi River. In the 1780s, the western border of the newly independent United States stretched to the Mississippi River. The United States reached an agreement with Spain for navigation rights on the river and was content to let the "feeble" colonial power stay in control of the area. The situation changed when Napoleon forced Spain to return Louisiana to France in 1802 and threatened to close the river to American vessels. Alarmed, the United States offered to buy New Orleans.