Skip to main content
Universal Encyclopedia

When did Morocco recognize American independence?

In December 1777, Sultan Mohammed III opened Morocco's ports to American ships — the first recognition the young United States received from any foreign sovereign. The Treaty of Peace and Friendship signed in 1786, and ratified the next year, remains in renewed form the longest unbroken treaty in American history.

Last updated: October 2026

The short answer

The decree came while Washington's army shivered at Valley Forge: Morocco, alone among the world's powers, wagered on the American cause. Mohammed III — Sidi Mohammed ben Abdallah — was opening his ports to all nations' trade; including the rebellious colonies was a deliberate, visionary bet. Nine years later his envoy and Thomas Barclay concluded the treaty that Jefferson and Adams signed in Paris and Congress ratified in July 1787, two months before the Constitution.

A sultan's opening move

On 20 December 1777, Sultan Mohammed III of Morocco, known as Sidi Mohammed ben Abdallah, issued a proclamation that American ships could enter Moroccan ports freely and enjoy safe passage through Moroccan waters. The American colonies had declared independence from Britain in July 1776 and were fighting a war for it, but no foreign head of state had yet publicly recognised the new nation. Morocco, in the words of later historians, became the first sovereign state to do so.

The gesture was not charity. Morocco sat at the hinge of the Atlantic and the Mediterranean, at the mouth of the strait that every ship bound between Europe and the Americas had to reckon with. Its corsairs had long preyed on merchant shipping, and its ports supplied grain, hides, and other goods to European markets. For a sultan seeking trading partners and diplomatic weight, an opening to the rebellious colonies was a calculated move, and for the Americans, who depended on sea trade and had almost no navy, a friendly port on the far side of the Atlantic was worth a great deal.

From recognition to treaty

Recognition was one thing; a treaty was another, and it took nearly a decade. In 1785 the United States Congress authorised negotiations, and the following year it sent Thomas Barclay, its consul general in Paris, to Morocco. Barclay arrived in Marrakech in June 1786, carrying proposals based on a draft prepared by Thomas Jefferson. He met the sultan's envoy, Tahar ben Abdelhak Fennish, and the two sides reached agreement within days. The sultan sealed the Treaty of Peace and Friendship on 28 June 1786.

The treaty ran to twenty-five articles, in Arabic, English, and Spanish. It promised protection for American shipping along the Moroccan coast, commerce on a most-favoured-nation basis, and the humane treatment of prisoners in any future war, who were not to be enslaved but exchanged. Unusually for agreements of its era, it involved no tribute: Morocco accepted American friendship alone as the price. Jefferson signed the treaty in Paris on 1 January 1787 and John Adams in London on 25 January 1787; Congress ratified it on 18 July 1787. The United States Department of State describes the relationship it opened as the longest unbroken treaty relationship in American history.

Why Morocco moved first

Historians point to several motives behind the sultan's decision. Morocco had watched the European powers carve up trade and territory, and a new, grateful partner across the Atlantic promised leverage. The sultan also wrote to European rulers recommending that they make peace with the Americans, acting as a broker between the new republic and the old continent. And there was a practical matter: without a treaty, American merchant ships remained fair game for Moroccan corsairs, as the ships of other nations were. Recognition turned a threat into a trading partner.

The move also fitted a longer Moroccan tradition of diplomacy conducted on its own terms. Morocco had negotiated with European crowns for centuries, alternately fighting, trading, and treating with Spain, France, Britain, and the Netherlands. The American opening was one more negotiation in a long line, conducted by a sovereign who understood exactly what his ports and his position were worth.

Two centuries and more

The relationship deepened through the nineteenth century. In 1821 Sultan Moulay Suleiman gave the United States a building inside the old medina of Tangier, the first property the American government ever acquired abroad. It served as a diplomatic post for some 140 years, and after the embassy moved to Rabat following Moroccan independence in 1956, the building became a museum and research library. In 1982 it was designated a National Historic Landmark, the only one outside the United States.

During the Second World War, Morocco hosted the Casablanca Conference of January 1943, where President Franklin Roosevelt met Prime Minister Winston Churchill and announced the policy of unconditional surrender. After independence, the two countries built a broad partnership covering security, trade, and culture. A free trade agreement between them entered into force in 2006, the only one the United States has with an African country. Morocco remains, in the formal language of American diplomacy, a major non-NATO ally, and the treaty of 1786, renewed and still in force, remains the foundation stone of the relationship.

The full file

Encyclopedia

Read the full file

In December 1777, Sultan Mohammed III opened Morocco's ports to American ships — the first recognition the young United States received from any foreign soverei…

Sources

Related questions

More from the Bureau

All questionsFactbookRankings

Across the Bureau

The Alaouite dynasty: Morocco's unbroken throneThe Amazigh: North Africa's first peopleMorocco — Country ProfileHistory of Morocco — TimelineDid Morocco acquire 36 Atmos 2000 self-propelled artillery guns?Did Morocco acquire 600 FIM-92K Stinger Block I MANPADS missiles?What is the population of Morocco?Who is the president of Morocco?