Moroccan–American Treaty of Friendship

[2] It was the first treaty between the U.S. and an African, Muslim nation, and initiated what as of 2025[update] remains the longest unbroken diplomatic relationship in U.S.

American diplomat Thomas Barclay was chosen to represent the U.S., and with the aid and backing of Spain, met his Moroccan counterpart, Tahir Fannish, in Marrakesh in June 1786.

He began seeking one with the United States before the war with Great Britain had ended in 1783, and he welcomed Thomas Barclay's arrival to negotiate in 1786.

[9] It was reaffirmed by the sultan in 1803, when the USS Constitution, Nautilus, New York, and Adams engaged in gunboat diplomacy as part of the First Barbary War.

At the time, independent corsairs and pirates were using Morocco's ports as safe harbors between raids on American and European shipping.

Scan of the complete Arabic text of the Moroccan-American Treaty of Friendship, executed in a Maghrebi script . June 22, 1786 or Sho'ban 25, 1200 hijri