so I learned in school that Morocco was the first country to recognize the USA as an independent nation, this kind of legitimized it. so my question is, why didn't France do that? they helped the US get free from England.
If there are any actual historians who have knowledge on this, please correct me.
It seems that the Sultan of Morocco actively reached out to form relations with the U.S. in 1777. That is considered the basis of the first claim. The U.S., however, did not respond. According to the State Department, Morocco recognized the U.S. in 1786 when the Treaty of Friendship was negotiated: http://history.state.gov/countries/morocco
French recognition of the United States was in 1778. France not only recognized the U.S. as independent after the war, but during. http://history.state.gov/countries/france
Great Britain recognized the independence of the U.S. in the Treaty of Paris in 1783. That does count as official recognition. http://history.state.gov/countries/united-kingdom
In short, Morocco gets to make its claim because it made a unilateral effort to start relations. However, if you only count when the U.S. actually cared it was being recognized, it is not first, but the sixth.
The Netherlands were the 2nd nation to recognize the U.S. in 1782. Spain was 3rd (Feb 20, 1783). Sweden was 4th (April 3, 1783). Great Britain was 5th (September 3, 1783). A Minister to Russia was sent in 1780 (arriving in 1781), but his credentials were refused. He remained as a private citizen.
TL/DR: Morocco claims to be first because the Sultan tried to open up ties in 1777. However, the official order of diplomatic recognition goes France, Netherlands, Spain, Sweden, United Kingdom, Morocco.
Here's some additional info from the US embassy in Morocco website:
Morocco was one of the first countries to accord recognition of the new American republic when it allowed American ships access to Moroccan ports in 1777, shortly after the outbreak of the American Revolution. Less than ten years later, the two countries signed a Treaty of Friendship and Peace which was renewed for an indefinite term in 1836. As testament to the special nature of the U.S.-Moroccan relationship, the Moroccan city of Tangier is home to the oldest U.S. diplomatic property in the world, and the only U.S. National Historic Landmark located outside the United States, the Tangier American Legation.
Even though the treaty of friendship was signed until 1786.In 1777 the moroccan sultan included the United States in a list of coutries to which moroccan ports were open. Morocco thus became the first country whose head of state publicly recognized the new United States,a little bit earlier than France.