On December 20, 1777, while the American Revolution was still undecided, Sultan Mohammed III made a commercial decision with diplomatic weight. He decreed that American ships could enter Moroccan ports and pass safely through waters under his authority.[1]
The Moroccan-American Treaty of Peace and Friendship, signed in 1786 and ratified in 1787, formalized relations between Morocco and the United States. Morocco had already become the first state whose ruler publicly recognized U.S. independence by opening its ports to American vessels.
The United States was still fighting Britain when Morocco treated American ships as belonging to a country worth doing business with. For a republic trying to convince foreign powers that it would survive, a harbor could serve as a kind of argument. Ships needed entry, merchants needed protection, and diplomats needed signs that the new nation existed outside its own declarations.[1]
Nearly ten years passed before that port decree became a formal agreement. The Moroccan-American Treaty of Peace and Friendship, also known as the Treaty of Marrakesh, was signed in 1786 to establish diplomatic and commercial relations between Morocco and the United States.[1] It was the first treaty the United States signed with a non-European state.[1]
A Sultan Looking Outward
Mohammed III, also known as Sidi Muhammad bin Abdallah, had come to power in 1757 after Morocco had endured decades of internal conflict and instability.[1] His reign emphasized restoring the authority of the sultanate and expanding international trade, a strategy that improved Morocco’s position abroad.[1]
Agreements with foreign commercial powers were central to that project. Mohammed III began seeking an arrangement with the United States even before the war with Britain ended in 1783.[1] On the American side, John Adams, John Jay, and Benjamin Franklin urged action, and Congress authorized negotiations with Morocco in 1785.[1]
Thomas Barclay, the American diplomat chosen for the job, traveled to Marrakesh with Spanish aid and backing.[1] In June 1786, he met Tahar ben Abdelhak Fennish, his Moroccan counterpart.[1] The treaty was completed within days of Barclay’s arrival, sealed by Mohammed III, then signed by Thomas Jefferson in Paris and John Adams in London.[1] Congress ratified it on July 18, 1787.[1]
What “Friendship” Meant
The word “friendship” can sound ornamental in a treaty title now, but such agreements often carried practical meaning. Friendship treaties have been used to define access to harbors, trading lanes, fisheries, resources, and cooperation between states.[2] They have also signaled an independent relationship with emerging states.[2]
Morocco’s agreement with the United States fits that older diplomatic world. The relationship did not begin as a battlefield alliance. It began with ships, ports, safe passage, commerce, and recognition. A North African monarchy saw value in dealing with a fragile republic across the Atlantic, and the republic needed that kind of treatment from foreign powers.
The original treaty was set to last fifty years.[1] The cast around it now reads like a map of early American diplomacy: Mohammed III in Morocco, Barclay in Marrakesh, Jefferson in Paris, Adams in London, and Congress ratifying an agreement that connected the United States to a non-European power.[1]
A physical trace of that moment survives in the description of the complete Arabic text, executed in Maghrebi script and dated June 22, 1786, or Sho'ban 25, 1200 in the Hijri calendar.[1] Before it became a diplomatic anniversary, it was ink on paper, moving between courts and capitals, promising peace and friendship across the sea.

