In April of 1776, just prior to declaring independence, Congress opened all American ports for trade with any part of the world not under British rule. Americans were eager to spread their influence and engage in international trade. Only two decades later, American trade had prospered internationally. However, in the very strategic intersection of the Mediterranean shores of North Africa, the Barbary pirates, who had caused havoc for centuries, were not sparing American ships.

Immediately after Thomas Jefferson’s inauguration in 1801, Yusuf Karamanli, the Pasha of Tripoli, demanded a tribute (equivalent to $3.3 million in 2017) from the new US administration. The United States had previously paid similar bribes to the Dey of Algiers, securing their ships from harm.

But Jefferson saw that this bribery system imposed a heavy financial drain on the US economy and rejected the tribute demand. In what can only be characterised as a customary Barbary declaration of war, Karamanli chopped down the flagpole upon which the American flag flew in front of the US consulate in Tripoli. After battles between the two sides for a number of years, Karamanli signed a treaty ending the war in 1805, and the US was victorious.

I’m afraid this may read like a slow piece on American history; nonetheless, the symbolism of the Barbary Wars as the moment of America’s appearance on the international stage, as well as its consequent attempt at international domination, is worth lengthy analysis.

One must examine the Barbary Wars in the context of a new American state fresh off a lengthy struggle for independence. The founding fathers of the US declared independence from Britain’s King George III in 1776, and, no more than two and a half decades later, American ships were across the Atlantic on the shores of North Africa, willing to engage in direct conflict with semi-autonomous Ottoman states. When challenged by Karamanli, the young American state did not hesitate to go to war against seasoned pirates to defend its trade routes. At this time, the US was still a relatively minor player in a world dominated by Britain and other Western European colonial powers, yet it did not shy away from utilizing its military in pursuing the right to trade.

The Barbary Wars show that since its inception, the US has engaged in an international struggle for power, often in a hawkish manner. In a world of relative anarchy, the US decided early on that it would impose its presence and ensure its sovereignty wherever it went, at any cost.

Up until the early 20th century, the US did not have a reason to seek moral or legal justification when pursuing these interests on the international stage – it was free to attack and destroy, so long as it did not cross any dominant European players. But this was going to change – at least on the surface – after World War II.

The birth of a so-called ‘moral’ superpower

The US officially entered World War II following the attack on Pearl Harbor in 1941, two years after the start of the war. Although it formally maintained neutrality up until that moment, the US had long been involved in the war, providing support to the Allies – because it knew that the war was a threat to its security and its trade routes.

When it entered the war alongside Britain, US propaganda portrayed this venture as a simple ideological battle – Britain and the US were in the war to “defend democracy” in the rest of the world. Of course, this was an extremely simplistic narrative: Entering the war was a question of self-interest for the US, as it knew that American trade would suffer in the long term if Germany had won the war and dominated the whole of Europe.

When the Allies eventually won the war, the atrocities committed by Nazi Germany and Japan shaped the dominant narrative about the conflict on the international stage and led to the beginning of a new era in which the “morality”, as well as the legality of military interventions, was questioned for the very first time (Of course, the Allies’ bombing of German civilians in Dresden or the atomic bombs the US dropped on Japanese civilians were brushed away as “necessary actions” taken only to end the war). The United Nations was established with the hope that it could prevent similar brutal interstate warfare in the future.

The end of the war also marked the end of the Euro-centric world order, and with European powers in remission, the US automatically became the world’s dominant military power. Since it claimed moral superiority throughout the war – as the defender of freedom against fascist aggression – it had also become the world’s first “moral” superpower at this turning point in history. It took over the responsibility of policing the world but did not allow this new role to hinder its hawkish struggle for power. Instead, it started to use this new “moral” dynamic to do what it had been successfully doing since the Barbary Wars: aggressively protecting its national interests and seeking economic and military domination.

Throughout the Cold War, the US continued to present itself as a moral force, this time against the “communist threat”. Of course, beyond the propaganda efforts, morally ambiguous actions of the US across the world – from Southeast Asia to Latin America – during this period demonstrated that the moral legitimisation it presented for its actions were nothing but a facade. But by presenting the Soviet Union as the ultimate threat to the newly established world order, the US managed to convince its allies that it was still a force for good. Upon the collapse of the USSR, the US continued with this strategy of paying lip service to the laws and norms regulating international relations while aggressively pursuing its own interests – only this time without a major competitor.

A crumbling facade

In the 21st century, the hypocrisy of the US claim to moral superiority became even more evident when President George W Bush declared the beginning of “Operation Iraqi Freedom” in March 2003. In his now infamous speech, President Bush told Iraqis that “the day of their liberation is near”. The Bush administration claimed a just cause, arguing that the Iraqi regime had developed and used weapons of mass destruction (WMD), while also committing egregious human rights abuses. The rationale the administration attempted to sell was that the Iraqi people were in need of the American ideals of democracy and freedom.

As the world would come to know, however, the claims about Iraq’s WMD’s were based on lies, and the result of this invasion was not quite so utopian. Over the years, it became obvious to many that the US attacked a sovereign country not to bring freedom and democracy, but to pursue its national interests. Hundreds of thousands of innocent lives were lost, and even more were left worse off forever. Fifteen years later, the Iraqi state is still in shambles.

For too long the US tried to use abstract ideals like freedom and democracy to convince the international community that it is fighting for moral and just causes. But the warm, heavy cloak of moral superiority the US had wrapped itself in after its victory in the WWII is finally slipping. Following the military quagmires in the Koreas, Vietnam, Iraq, and of course in Afghanistan, the American image has suffered significantly. Today, the American military may remain the best – and most influential – in the world, but the US has lost any claim to moral superiority.

The Barbary Wars served as the initiation of an American intent to set the rules on the global stage and eliminate challengers to that dominance. The way the US conducts itself in the world has not changed much since its inception – for a while, it succeeded in hiding its hawkish pursuit of domination behind false moral pretences, but the game is finally up.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.