In 1777,
Morocco became the first state to recognize the independence of the USA.
US-Moroccan diplomatic relations were strengthened when US diplomats Thomas Jefferson and John Adams signed the Moroccan–American Treaty of Friendship with Sultan Muhammad III in 1786. The treaty is still considered to be in effect and is the longest unbroken treaty in US history.
https://en.wikipedia.org/wiki/Moroccan%E2%80%93American_Treaty_of_FriendshipPrince Abdulrahman Ibrahim Ibn Sori from Guinea was enslaved and brought to the US in 1788. Sultan Abd ar-Rahman of Morocco petitioned the US for his release. US President John Quincy Adams Secretary of State Henry Clay negotiated with his "owner" to release him without payment, although the terms of his release stipulated that he would be deported from the US. White Supremacist Andrew Jackson ran against John Quincy Adams for the presidency, using Prince Sori's release as a talking point in his campaign.
https://en.wikipedia.org/wiki/Abdulrahman_Ibrahim_Ibn_SoriWhile nations like the UK were favorable to the Confederacy in the US Civil War, Morocco was strongly aligned with the Union:
https://en.wikipedia.org/wiki/Morocco%E2%80%93United_States_relations#American_Civil_WarBy 1920, Ho Chi Minh became a leading figure in the Vietnamese independence movement. He joined an organization which petitioned the victorious powers of WWI for Vietnamese independence under their principle of "self-determination". The request was denied, since "self-determination" in the wake of WWI was merely a pretense to dismantle the defeated powers and "balance" the distribution of power in Europe by dividing populations along ethnic lines.
During WWII, the US and the pro-independence Viet Minh organization had close ties and supported each other in the war against Japan. Supposedly, President Roosevelt and General Eisenhower both supported an alliance with Ho Chi Minh for a post-WWII Vietnam, although things never worked out. In 1945, after WWII had ended,
Ho Chi Minh declared Vietnam's independence and quoted from the US Declaration of Independence. (He also quoted from the 1791 French Rights of Man, highlighting the hypocrisy of the French colonialists.) Unfortunately, the US had become strongly Westernized by this time and did not ally with Vietnam, offering them no alternatives expect communism.
http://historymatters.gmu.edu/d/5139/https://en.wikipedia.org/wiki/United_States%E2%80%93Vietnam_relations#Before_1945Apparently
President Grant had promised an alliance with Vietnam in the 1870s when they were being invaded by France, although Congress refused. Vietnam had become completely colonized by the 1880s. Vietnam remembered the times the US at least tried to offer solidarity, but the US unfortunately forgot its past and became the victimizer instead.
https://en.wikipedia.org/wiki/United_States%E2%80%93Vietnam_relations#19th_centuryIronically, today Vietnam has good diplomatic relations with the US and relatively poor relations with China (who helped them win the US-Vietnam war), further demonstrating the stupidity of the US's role in the Vietnam war. For additional irony, Americans of Vietnamese descent (most of whom fled South Vietnam) are a strongly rightist and Trumpist demographic!