Morocco became the first country in the world to recognize the independence of the United States.
In 1777, Sultan Mohammed ben Abdallah opened Moroccan ports to American ships and treated them as vessels of a friendly independent nation. This action made Morocco the first country to recognize the new United States, even while the Revolutionary War was still being fought. Morocco’s decision was especially significant because the United States had little naval power to protect its merchant vessels in the Mediterranean.
Formal diplomatic relations came later. The Moroccan-American Treaty of Peace and Friendship was signed in 1786 and ratified by the Confederation Congress in 1787. It established commercial and diplomatic relations between the two countries and remains central to their historical relationship.
France is often confused with Morocco because France signed the 1778 Treaty of Alliance and openly supported the American war effort. France was the first major European power to recognize and ally with the United States, but Morocco’s recognition came earlier.