Fortified by the Franco-American Alliance, the Americans maintained an impasse with the British until 1781, when the Americans laid siege to a large encampment of British forces under Lord Charles Cornwallis at Yorktown, Virginia. Scattered battles persisted until 1783, but the British, weary of the stalemate, decided to negotiate peace.
The war came to an official close in September 1783, when Britain, the United States, France, and Spain negotiated the Peace of Paris. The treaty granted vast tracts of western lands to the Americans and recognized the United States as a new and independent country. The last British forces departed New York in November 1783, leaving the American government in full control of the new nation.