Last Thursday at 2.42am, four Israeli jets fired a volley of missiles at a Syrian government facility, destroying buildings believed to be associated with the production of chemical weapons, killing two Syrians on the ground in the process. A statement from Syria issued hours later warned of “dangerous repercussions of such hostile acts on the security and stability of the region”.

This is not the first time Israel has used force to destroy facilities capable of producing unconventional weapons. In 1981, it launched an attack on the Osirak nuclear reactor in Iraq, claiming the reactor had “less than a month go to” before “it might have become critical”. The United Nations security council quickly condemned the attack as a “clear violation of the charter of the United Nations and the norms of international conduct”. Other representatives of powerful nations – including Margaret Thatcher – joined in the condemnation. They pointed out that the UN charter prohibits the use of force by one state against another, with only two explicit exceptions: when the security council has approved the use of force (it hadn’t) or when state has a legitimate claim to self-defence (the consensus was that Israel didn’t).

By contrast, Israel’s attack in Syria this month met with deafening silence. One reason is obvious: Bashar al-Assad, the Syrian president, has launched horrific chemical weapons attacks on civilians, and many world leaders want to see him stopped. But many wanted to keep Iraq from obtaining nuclear weapons in 1981 and yet criticised the Israeli attacks as “a grave breach of international law” (as Thatcher put it). What has changed is not the content of the Israeli action – a clear violation of the UN charter in both cases – but its context. Today, perhaps more than at any time since 1945, the prohibition on use of force that has been the backbone of the international order for most of the last century is under attack. Indeed, it is in danger of collapsing – and taking the order it upholds down with it.

After all, Israel is not the only country to use military force unilaterally in recent years. In 2014, Russia seized Crimea from Ukraine, the first conquest of one state by another in Europe since the second world war. In April this year, the new US president, Donald Trump, launched his own attacks on the Syrian military in retaliation for chemical weapons attacks. Meanwhile, China has intimidated its neighbours into passivity while it transforms submerged reefs in the South China Sea into modern military installations over which it claims sovereign control. With these developments, only two members of the UN security council are not at present directly implicated in illegal uses of force: France and the UK. Yet both cheered Trump’s April strikes in Syria. The French president Emmanuel Macron declared that the use of chemical weapons would cross a red line, and suggested France would also respond with force. These breaks with the charter are not without precedent. Nato’s intervention in Kosovo in 1999, the so-called “war on terror” after the 9/11 attacks, and the US-led invasion of Iraq in 2003 had already set the stage.

An airstrike in Kobani, Syria. Photograph: Lefteris Pitarakis/AP

Individually, these breaches of the international prohibition on the use of force may seem modest. But international rules regarding the use of force are not a minor feature of the world we live in – and the fact that these rules have often been broken should not obscure how important they remain.

They are at the heart of some of the most beneficial transformations of the past 70 years, from the global decline in interstate conflict and combat deaths to the rising wealth and health that peace has allowed. With these rules at risk, the international community is facing a crisis of extraordinary proportions. Yet few people appreciate how serious and imminent the crisis is. Fewer still understand where these rules came from: a now-almost-forgotten agreement known as the Paris Peace Pact of 1928 that was eventually signed by all the nations of the world and had the immodest goal of outlawing war. In order to appreciate the magnitude of the threat, we must return to a world very different to our own, one in which the rules that we currently take for granted did not exist. The risk we face is reverting to this world, where might was right and war was legal.

The modern attitude is to regard wars as moral catastrophes to be avoided at almost all costs. We recognise that some wars may be just – even necessary – but they are to be entered into only in a narrow range of cases, such as repelling military aggression. To start a war for any other reason is a breach of international law.

Not that long ago, however, state leaders would have viewed war very differently. A century ago, war wasn’t considered a moral catastrophe; it was instead regarded as a legal and legitimate instrument of state action. It wasn’t a departure from justice; it was justice. In this global system – call it the “old world order” – war wasn’t something to be ardently avoided; it was the indispensable means by which states carried out the business of statecraft.

The intellectual architect of the old world order was a Dutch thinker, Hugo Grotius, who wrote about and practised law in the early 17th century. In Grotius’s influential telling, war was a legitimate way – indeed, often the only way – in which states could enforce their rights. Since there was no world government to which states could appeal, according to Grotius, they had no choice but to take the law into their own hands. He expressed his idea as follows: “Where judicial settlement ends, war begins.”

Today, war is mainly seen as a means of defending lives and territory. But Grotius saw war as morally valuable and legally viable in every sphere touched by a state’s powers, from finance to criminal justice. If loans were not repaid, war was a morally permissible way to collect what was owed. If property was taken without permission, restitution could and should be obtained by force of arms. If some injury had been inflicted, the military was free to collect reparations. And if a crime had been committed, war was useful for punishing criminals who would otherwise escape retribution.

In setting out this conception of war, Grotius was drawing on a long tradition in western moral thought often called “just-war theory” – articulated in various forms over the centuries by thinkers such as Cicero, Augustine of Hippo, and Thomas Aquinas. These thinkers differed on many aspects of the right of arms and conduct in battle, but they all agreed that war was a morally legitimate activity and could be waged justly. But Grotius went beyond these thinkers. Just-war arguments emphasised that the basic function of war was to respond to threatened or actual wrongs when no peaceful option remained. Unprovoked acts of aggression, whether battles for glory, riches or sheer animus, were not just wars; indeed, they were indistinguishable from mass killing and robbery sprees.

Grotius accepted this traditional conception of war, but he drew a startling conclusion from it: if states had the right to wage war to right legal wrongs, then they necessarily had the right of conquest as well. Any state that claimed it had been wronged by another state, and whose demands for reparations were ignored, could retaliate with force and capture territory as compensation. The conquering state thereby became the new sovereign of the captured territory: it owned all the public property on it and possessed the legal authority to rule over its subjects. Grotius wasn’t merely engaged in theoretical reflection. He was describing state practice. After all, nearly every border in the world today bears witness to some such past battle. Nor was he a disinterested observer. As a lawyer for the Dutch East India Company, he developed rules that favoured an expanding global empire.

The Strand, London, at the beginning of the second world war. Photograph: Central Press/Getty Images

Not only did states have the legal right to wage war to redress perceived wrongs. They could also threaten to wage war for the same purpose. It would be absurd to require states to actually wage war if they could obtain justice by merely threatening it. Thus, King Stanisław August Poniatowski and the Polish legislature (known as the Sejm) agreed in 1773 to cede 30% of Polish territory and half of its population to Austria, Prussia and Russia when these states threatened war. As the historian of Poland Norman Davies described this macabre act of self-mutilation, “The victim not only gave his assent for the operation; he was persuaded to wield the knife himself.”

In the old world order, then, war was a tool for responding to threatened or actual wrongs where no peaceful option remained – a legal means of redress; in many cases, the only such means. To wage war, therefore, was not a criminal act. It was what states did to uphold the law.

The old world order thus granted immunities to those who waged war – in effect, authorising mass homicide. If an ordinary person killed another outside of war, it was murderous. If an army killed thousands during a war, it was glorious. As a consequence, those who waged war were necessarily immune from criminal prosecution. Thus, after the first world war, the Treaty of Versailles promised to arraign Kaiser Wilhelm II for his role in the war. But the legal impropriety of the treaty was so glaring that the Netherlands, which had granted Wilhelm asylum after he abdicated, would not turn him over.

Legalising war didn’t only legitimise violence. It also blocked routes to peace. Because waging war was legal, economic sanctions by neutrals against belligerents were prohibited. A state that favoured one side over another in an ongoing war was deemed to be joining in that war and could be punished – even if it never fired a shot. Thus, if a neutral state traded with a belligerent but refused to trade with its opponent (or traded, but on less favourable terms), it violated its duty of neutrality and could be attacked in retaliation. Had the US traded with the UK but refused to trade with Germany when the first world war began, it would have violated its duty of neutrality and Germany would have been entitled to attack. It was for this reason that President Woodrow Wilson, who ran for re-election in 1916 on the slogan, “He kept us out of war”, called on Americans to remain “impartial in thought as well as in action”.

The theory that Grotius constructed was a work of formidable intellectual power. It was also the legal framework that sanctioned a morally absurd worldwide war. The first world war was the terrible culmination of the old world order. It left millions dead, millions displaced and the world’s leaders in despair. And it prompted another lawyer, centuries apart from Grotius, to rethink the theory that had justified so much suffering and rebuild a very different world order – one in which war was not only absurd, but also illegal.

Salmon Levinson was an unlikely revolutionary. A successful corporate lawyer in Chicago, he showed little interest in international affairs for most of his career. But when the first world war broke out in 1914, the senselessness of it angered him. He began to develop a simple but profound idea: the way to end war was to make it illegal. “The real disease of the world is the legality and availability of war,” he wrote in August 1917. “We should have, not as now, laws of war, but laws against war; just as there are no laws of murder or of poisoning, but laws against them.”

Levinson’s opening salvo, The Legal Status of War, appeared in the New Republic in 1918. “Suppose the world at peace,” the article began. “Abruptly Germany declares war upon France and invades her territories without even disguising the intention of annexation.” Regardless of the purpose of such a war, Levinson continued, it would be considered legal. And other nations had to recognise it as such. This “primary fact”, as he put it, was often ignored: “The civilised world puts all wars, as soon as they are initiated, upon the same plane of legality, without any regard to their origin and objectives.” The only real way to bring an end to war was what Levinson called “the outlawing of war”.

Levinson’s plan to outlaw war was unlike any other peace plan then under discussion. All the plans to date – proposals for disarmament, the League of Nations and countless variations – assumed the legality of war. They varied only in the ways in which they sought to direct its use, their designers working to shape institutions and incentives to make recourse to war as rare as possible. Those who had endeavoured to secure peace had not even thought to question the legality of war. It took someone new to international law and politics to propose an idea directly at odds with the international system.

Levinson explained his opposition to the League by likening it to antiquated practices of medieval hygiene:

Recently I heard a man cite a statement from a book on sanitation in the middle ages to the effect that in the days before bath tubs had been invented perfumes were used very profusely, and that when bath tubs came in, perfumes very largely went out. Now, our international experts are sold on perfumes, so to speak. They think to get rid of war’s menace by stifling its stench somewhat. No matter how poor a perfume is put on the market, they never fail to embrace it eagerly nor to give it the most flattering advance notices, especially if it has been bottled in a certain town in Switzerland.

Beginning in 1918, Levinson organised a global social movement around the idea of “outlawry”. The Outlawry of War movement, as it was called, culminated on 27 August 1928 when the Great Powers assembled in Paris. In the Clock Room of the French foreign ministry on the Quai D’Orsay, the foreign minister, Aristide Briand, declared before the assembled dignitaries that that day would “mark a new date in the history of mankind” and “the end of selfish and wilful warfare”. By signing the treaty, soon to be known as the Kellogg-Briand Pact or simply the Peace Pact, the nations of the world would no longer treat war as a lawful means to resolve disputes. Echoing Levinson’s revolutionary “outlawry” idea, Briand went on, the treaty would attack “the evil at its very root” by depriving war of “its legitimacy”.

Fifteen nations signed the Peace Pact on that day and within a year nearly every state in the world followed suit. For the first time in the history of the world, war was illegal.

By outlawing war, the Peace Pact overturned the fundamental principle of the old world order. But Levinson and the emissaries who signed the treaty in 1928 had no inkling of the chaos that would soon be unleashed.

The delegates who signed the pact had made one mistake: they had rejected a world in which war was the tool for resolving disputes and righting wrongs, but they had not yet considered what would take its place. War may have been terrible, but it served an essential function in a world of sovereign states. War was, after all, the way that states resolved their disputes with one another. How could a system of sovereign states exist without it?

Outlawing war worked – but it had consequences the leaders of the world failed to anticipate. To outlaw war was to remove the linchpin of the international system – without replacing it. It did not take long for the entire international legal order to fall to pieces.

The signing of Kellogg-Briand pact at the Palais D’Orsay in Paris, France, in 1928. Photograph: Bettmann/Bettmann Archive

The first challenge to the pact was quick to arise. In 1931, Japan – which had signed and ratified the pact – invaded Manchuria. The League of Nations was paralysed. Created after the first world war to keep the peace, the League had been built on old-world-order principles. It relied on war and the threat of war to enforce the rules. Its covenant stipulated, for example, that disputes had to be submitted to an international court and that states could not to go to war for a period of three months after the resolution of the dispute. But there was no limit on the right to go to war after three months.

The pact, however, pulled out these foundations. The League remained, but the pact prohibited all resorts to force except for self-defence – including those made to enforce the League’s rules. By the time Japan invaded Manchuria, nearly all the League’s members had joined the pact. They suddenly found themselves mired in contradiction. They had just renounced war. And this prohibition on war could not be enforced with war. But what other alternatives did they have? Economic sanctions had been illegal under the old world order; only war was legal. Could sanctions take the place of war as a legal tool for punishing states? As the world hurtled toward disaster in the 1930s, philosophers, lawyers, and statesmen struggled to figure out what would fill the vacuum left by the outlawry of war.

With the League paralysed, American leaders debated how to respond to Japan’s flagrant violation of a treaty that bore an American statesman’s name. The US secretary of state, Henry Stimson, was beginning to regard sanctions as a possible road to peace. He had not come to the idea on his own. Two years earlier, he had read an article by Levinson, who had been one of his classmates at Yale. In that article, Levinson addressed a vexing question: how could a peace pact be enforced? The solution he proposed was to replace the “sanctions of force” with the “sanctions of peace”. The key, according to Levinson, was to deny an illegal conquest any legal effect: “If it is unlawful to wage war, conquests by war should furnish no legal title.”

On 8 January 1932, Stimson delivered simultaneous diplomatic notes to the governments of China and Japan. The notes proclaimed a policy of non-recognition – what would later come to be called the Stimson doctrine. Stimson wrote: “[T]he American government … does not intend to recognise any situation, treaty or agreement which may be brought about by means contrary to the covenants and obligations of the pact of Paris.” The League quickly adopted the same approach. Japan could take Manchuria, but Manchuria would not belong to Japan.

The Stimson doctrine was the first step in constructing a new system of law in which war was illegal. Like a thread that hangs from a sweater, the League tugged on the strand until the fabric of the old world order began to unravel. And though the unravelling would not happen all at once, there would be no way to stop it once it began.

The thread led first to the legality of conquest, then to the law of neutrality. In the old world order, neutral states were under a strict duty of impartiality – no outsider to the conflict could treat combatants differently. Economic sanctions were thus illegal, and a cause for war. But now, the US attorney general, Robert Jackson, declared in 1941, the Peace Pact authorised the Lend-Lease Act, through which the United States supplied war material on favourable terms to the Allies. As a result of the pact, he explained, when a state has illegally resorted to armed force, “the traditional rules of neutrality need not be applied”. In other words, economic sanctions, once illegal, were now legal.

In a world where war was no longer legal, gunboat diplomacy had to end, too. After all, if war could no longer establish legal rights, then threats to wage war could not be allowed to establish legal rights either.

But not everyone agreed with these new rules. Germany, Japan and Italy rejected the pact (even though each had ratified it) along with its new rules. This may have been because the Axis powers had largely missed out on the colonial land grab. Japan only began to participate in international affairs in the 1860s, and it took more than a generation before it was prepared to project military force outside its own borders, too late to successfully participate in the empire-building scramble. Both Germany and Italy finally achieved unification in the same year – 1871. They joined the race to conquer territories soon after, but were never as successful as France, Spain, Portugal, the UK and the Netherlands, which built extensive empires under the rules of the old world order.

Without that same ability to wage war and conquer new territory, the Axis powers saw little possibility of achieving parity with their imperial rivals. As a result, the world descended back into war.

The second world war was a war of military might. But it also became a war of ideas. It was a war between two visions of the world. The Axis powers fought for the retention of the old world order, in which war was a legitimate means for resolving disputes. The Allies (and the internationalists who had created the Peace Pact) aimed to build a new legal structure grounded in the renunciation of war.

From the start, the Allies made clear that they were fighting for more than their own safety, more than the rights of those conquered, more than the defeat of Hitler and his allies and their vile ideas. They fought, as the US and UK put it in the 1941 Atlantic Charter, for the principle that “all the nations of the world … must come to the abandonment of the use of force”. When the Allies won, they did more than defeat Germany, Japan and Italy. They defeated the old world order.

The new United Nations that they created to keep the peace was built around the commitment of the pact to outlawing war. Indeed, the first draft of the charter, drafted by a committee in the bowels of the US State Department, included the pact verbatim. Later drafts revised it to its current form: “All members shall refrain in their international relations from the threat or use of force against the territorial integrity or political independence of any state, or in any other manner inconsistent with the purposes of the United Nations.” The exceptions were limited: the security council, on which the US, UK, Soviet Union, China and France would hold a veto, could authorise force to keep the peace. And states retained the right to defend themselves from “armed attack”.

Keeping the peace required more, however, than reiterating the prohibition on war, and more than creating a global institution that could collectively respond to threats to international peace and security. If waging aggressive war had indeed been illegal since 1928, then it had to be possible to hold those who had waged it responsible. The immunity enjoyed by heads of state under the old world order could not continue – which is why the trial of major Nazi war leaders at Nuremberg represented something more than simply victor’s justice. It was a prosecution for the gravest offense of the new world order – what Robert Jackson, the chief prosecutor for the United States, called “the worst crime of all” – aggressive war.

The world order that resulted from the pact has brought seven decades of unprecedented peace. Inter-state war has, by most measures, fallen precipitously – and as a result, territorial conquest has nearly disappeared. Before 1928, the average state could expect to be conquered about once every human lifetime; now, the average country will be subject to conquest roughly once or twice in a millennium. With this transformation has come a vast improvement in the human condition. Inter-state conflict has declined. Gunboat diplomacy has disappeared. Free trade has thrived.

But despite these achievements, the new world order is at greater risk today than ever before.

One source of risk comes from the rise of wars within states, which generate threats that spill outside their borders, and frequently provoke armed intervention in response. For even as inter-state wars have fallen, intra-state wars have risen. The wars inside Syria, Afghanistan, Iraq, Yemen, Libya and Sudan are testament to this new reality. And when societies break down, terrorist threats often take root. The rise of Islamic State in Iraq, and its spread throughout the Middle East, is just the latest example.

Yet the risk posed by Islamic State pales in comparison with the dangers posed by the powerful countries that gave rise to the new world order. For the system relies on them to maintain and police the system they helped create. When their commitment falters, the system is danger of erosion and even collapse. It is even worse when they not only fail to support the system, but act to undermine it – when Russia annexes Crimea, China illegally occupies islands in the South China Sea, and the US and Israel engage in military strikes against Syria in retaliation for the use of chemical weapons without first obtaining security council approval.

Violations of the prohibition on the use of force are, of course, not entirely new. States have been testing its limits for decades. When Nato intervened in Kosovo in 1999 without security council authorisation, it did so in clear violation of the charter. When the US invaded Iraq in 2003, again without security council authorisation, it struck another blow. In each case, there were plausible arguments for using force. In each case, the protagonists could describe their interventions as a special case – as necessary “just this once” – rather than an outright violation of the rules. But like successive waves crashing against a crumbling shore, each new intervention threatened to erode the limits on the use of force a little more than the one before.

Now, “just this once” is becoming the new normal.

If not defended and rebuilt, a system that was vulnerable and at risk could well collapse. For decades, even as the US often pushed the boundaries of the law, it also worked to police them – not always consistently and not always effectively, but often enough and effectively enough that the system continued to hold. America’s leaders recognised that their country benefited from the world order it had helped create.

The commitment to maintain the international order is one reason why the US went to war in 1991 to evict Saddam Hussein’s Iraq from Kuwait after its illegal invasion. More recently, the Obama administration pushed back against Russia’s annexation of Crimea by working together with the European Union to put in place an array of financial sanctions that, together with falling oil prices, dealt a painful blow to the Russian economy. And the US pushed back against Chinese encroachment in the South China Sea by sending its planes and destroyers into territory that China unlawfully occupied.

Moreover, the US and other western powers have become expert at using an array of financial tools to punish states that violate international law– tools that, for example, brought the Iranians to the negotiating table ready to give up their hunt for a nuclear weapon. Besides the US, the greatest pressure to maintain the new world order has come from Europe, the crucible of conflict that forged the Peace Pact. For decades, more and more states came to see their own self-interest as tied to the maintenance of a world order based on the outlawry of war. Now, with the waning commitment of that order’s most powerful defenders, all that progress is at risk.

As the world order stands on the brink, it is important to remember what is at stake. In a world of sovereign states, there are a limited set of legal systems to choose from. In one – represented by the old world order – all states agree that war is legal, a tool to right wrongs. In that world, conquest is permissible, aggression is not a crime, neutrals must stay impartial (thus economic sanctions against aggressors are illegal) and agreements may be coerced by the threat of violence. In the second – represented by the new world order – all states agree that war is illegal, and refuse to recognise it as a source of legal entitlements, even when it used to right wrongs. In that world, conquest is illegal, aggression a crime, economic sanctions are an essential tool of statecraft, and agreements cannot be coerced. In that world, moreover, trade plays an essential role not only as a source of beneficial collaboration but also as a tool for collectively constraining illegal behaviour.

The third option – represented by the period between the Peace Pact and the close of the second world war – is a configuration between these two polar opposites. But this third option is in many ways the worst of all. Inherently unstable, it will generate chaos and disorder until a new, stable equilibrium arises. International law is a system, and its rules rise or fall together. It is not possible to pick and choose the rules one at a time, as so many world leaders wish today. The key rules of the system have, and must have, a necessary logical connection to one another. Nor is it possible to follow one set of rules sometimes, and another set at others. The world cannot juggle two inconsistent legal orders for very long. Sooner or later they will clash and come crashing down.

For the world order built after 1928 to continue, the US, the UK and their allies must redouble their commitment to the rules and institutions that underlie it. The states that created the world order must reaffirm their commitment to the core principle of that legal order – the rejection of war as a way to resolve disputes and right wrongs

To protect this central principle does not require accepting every feature of the present order. The operation of international institutions can and should be improved. We can improve how sanctions are used to encourage states to follow the rules without excessively harming citizens who are, in many cases, victims of those states as well. We can develop better treaties and better means of enforcing them.

But we should not let the real problems with the new world order blind us to all the ways in which it is better than the old. It is better to live in a world where conquest is not recognised than in one where it is. It is better to live in a world where treaties made under threat can be torn up than in one where they are binding. It is better to live in a world where those who wage aggressive war can be convicted in a court of law than in one where they cannot. It is better to live in a world where states can use economic sanctions to punish aggressors without fear of being drawn into a war as a consequence. In short, it is better to live in a world where war is not a permissible mechanism for righting wrongs, even if that means some wrongs remain unaddressed.

It is tempting to resort to force to solve any given problem. It is tempting to see one’s own cause as sufficient justification for sacrificing a broader set of objectives. Indeed, it was precisely this logic that gave rise to the old world order and the horrors it unleashed. The further we get from that bloody system, the easier it is to forget that the world once looked very different – and much less pleasant. But when war is a tool of justice, only force determines what is just.

Main picture: Ethan Miller/Getty Images

This essay is adapted from The Internationalists: And Their Plan to Outlaw War by Oona A Hathaway and Scott J Shapiro, published this week by Allen Lane.

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.