The defeat of the British in Saratoga, north of New York, in October 1777, was important. From there, France arrived openly in the war: supported with money, arms, and armies of sea and land. Spain, which supported the rebels with money, arms, and ammunition, was still reluctant to direct intervention.
In 1781 they surrendered the last English redoubt in Yorktown, in front of a French fleet and a combined French-American army of 16,000 men, under the command of George Washington.
On September 3, 1783, the treaty was signed by which Great Britain recognized the independence of the United States and returned to Spain, France, and Holland several possessions, although Canada maintained.
George Washington was elected the first president of EE. UU in 1789, under the terms of the Constitution of 1787, and the oldest in the world, because it is maintained until now with only a few amendments.