During the American Revolution against the British, Morocco was the first nation in December 1777 to "recognize" the fledgling United States as an independent nation by declaring that "American" merchant ships would be under the protection of the sultanate and could thus enjoy safe passage from the Barbary pirates.

The Treaty of Alliance was the American Revolutionary War alliance with France. France was the first country to "officially" recognize the United States as an independent state on February 6, 1778.

The Republic of the Netherlands became the second nation to "officially" recognize the United States of America when The Hague accepted the credentials of Minister John Adams on April 19, 1782.

The Treaty of Amity and Commerce Between the United States and Sweden was a treaty signed on April 3, 1783 establishing a commercial alliance between these two nations and was signed during the American Revolutionary War.

More Info: en.wikipedia.org