Morocco, which in 1777 was the first independent nation to publicly recognize the United States, in 1784 became the first Barbary power to seize an American vessel after the nation achieved independence.