A military alliance is a formal agreement between nations concerning national security. Nations in a military alliance agree to active participation and contribution to the defense of others in the alliance in the event of a crisis.  In the event a nation is attacked, members of the alliance are often obligated to come to their defense regardless if attacked directly. In the aftermath of the Second World War military alliances usually behave less aggressively and act more as a deterrent. 
Military alliances can be classified into defense pacts, non-aggression pacts, and ententes.  Alliances may be covert (as was common from 1870 to 1916) or public. 
According to a 2002 dataset of military alliances, there have been 538 alliance treaties from 1815 to 2003.  The vast majority of the alliances involve commitments to come to the military support of one ally involved in war.  The vast majority are defensive in nature. 
Military alliances are related to collective security systems but can differ in nature. An early 1950s memorandum from the United States Department of State explained the difference by noting that historically, alliances "were designed to advance the respective nationalistic interests of the parties, and provided for joint military action if one of the parties in pursuit of such objectives became involved in war." A collective security arrangement "is directed against no one; it is directed solely against aggression. It seeks not to influence any shifting 'balance of power' but to strengthen the 'balance of principle.'" 
The obvious motivation in states engaging in military alliances is to protect themselves against threats from other countries. However, states have also entered into alliances to improve ties with a particular nation or to manage conflict with a particular nation. 
The nature of alliances, including their formation and cohesiveness (or lack thereof), is a subject of much academic study past and present, with the leading scholars generally considered to be Glenn Snyder and Stephen Walt.  Other schools discussing military alliances in international relations include the neorealist school introduced in 1979. It was first outlined by Kenneth Waltz in his 1979 book Theory of International Politics .  Alongside neoliberalism, neorealism is one of the two most influential contemporary approaches to the study of military alliances in international relations; the two perspectives dominated international relations theory from the 1960s to the 1990s.  Neorealism emerged from the North American discipline of political science, and reformulates the understanding of military alliances in the classical realist tradition of E. H. Carr, Hans Morgenthau, George Kennan and Reinhold Niebuhr. Neorealism is subdivided into defensive and offensive neorealism.
During peace-time, according to a 2019 study, almost all alliances from 1870 to 1916 may have been covert or implied. In other time periods, covert alliances have been rare. The study argues that from 1870 to 1916, the unusual amount of covert alliances was incentivized by other covert alliances. The creation of public alliances would signal to the covert ally that the public alliance was more valuable.  According to Ronald Krebs, pre-WWII alliances were generally "relatively simple, short-lived affairs." 
Common problems for alliances revolve around free-riding and burden-sharing. Members of an alliance have incentives not to contribute to the alliance while simultaneously benefiting on the public goods provided by the alliance. According to Mancur Olson and Richard Zeckhauser's classic study of alliances, small states frequently free-ride on the large state's contributions to an alliance.  Small allies that are militarily vulnerable are less likely to free-ride, whereas strategically important small allies are most likely to free-ride.  Alliances may also lead to moral hazard whereby allies behave more aggressively and recklessly if they believe that the alliance will aid them in any conflict.   On the whole, alliances do deter aggression on net. 
Within alliances, actors may fear entrapment or abandonment.    Entrapment means that allies get dragged into a conflict over one ally's interests that the other allies do not share.  Abandonment means that allies do not come to the rescue of a fellow ally.  Strong commitments to an alliance can reduce the bargaining power of that ally vis-a-vis the other allies.  However, an ally whose commitment to the alliance is in doubt has greater bargaining leverage.  Weak alliance commitments can make it easier for the ally to realign the alliance if a fellow ally is considered unsatisfactory.  Strong alliance commitments may strengthen the adversary's alliance, as the adversary may face a greater threat. 
The failure of a strong ally to come to the rescue of a weaker ally (abandonment) may jeopardize the strong ally's other alliances. However, it may also strengthen the other alliances, as the other allies may sometimes prefer that the strong ally abandons a weak ally if it is likely to raise the risks of military escalation for the other allies. 
In the European historical context, a military alliance can be viewed as a league between independent states, defined by treaty, for the purpose of combined action, defensive or offensive, or both. The oldest such alliance in the world today is the Anglo-Portuguese Alliance, dating back to 1373 where the then Kingdoms of England and Portugal pledged to "perpetual friendship" between the two countries. This remains in action today between the current United Kingdom and Portugal, and the two have never fought against each other in any military campaign. Alliances have often been directed to specific objects carefully defined in the treaties. Thus the Triple Alliance of 1668 between Great Britain, Sweden and the Netherlands, and the Grand Alliance of 1689 between the Holy Roman Empire, Holland, England, Spain and Saxony, were both directed against the power of Louis XIV of France. The Quadruple or Grand Alliance of 1814, defined in the Treaty of Chaumont, between Great Britain, Austria, Russia and Prussia, had for its object the overthrow of Napoleon and his dynasty, and the confining of France within her traditional boundaries. The Triple Alliance of 1882 between Germany, Austria and Italy was ostensibly directed to the preservation of European peace against any possible aggressive action of France or Russia; and this led in turn, some ten years later, to the Dual Alliance between Russia and France, for mutual support in case of any hostile action of the other powers. 
Occasionally, however, attempts have been made to give alliances a more general character. Thus the Holy Alliance of 26 September 1815 was an attempt, inspired by the religious idealism of the Emperor Alexander I of Russia, to find in the "sacred precepts of the Gospel",  a common basis for a general league of the European governments, its object being, primarily, the preservation of peace. So, too, by Article VI of the Quadruple Treaty signed at Paris on 20 November 1815 – which renewed that of Chaumont and was again renewed, in 1818, at Aix-la-Chapelle – the scope of the Grand Alliance was extended to objects of common interest not specifically stated in the treaties. The article runs: "In order to consolidate the intimate tie which unites the four sovereigns for the happiness of the world, the High Contracting Powers have agreed to renew at fixed intervals, either under their own auspices or by their respective ministers, meetings consecrated to great common objects and to the examination of such measures as at each one of these epochs shall be judged most salutary for the peace and prosperity of the nations and the maintenance of the tranquility of Europe". 
It was this article of the treaty of the 20 November 1815, rather than the Holy Alliance, that formed the basis of the serious effort made by the great powers, between 1815 and 1822, to govern Europe in concert. In general it proved that an alliance, to be effective, must be clearly defined as to its objects, and that in the long run the treaty in which these objects are defined must – to quote Otto von Bismarck's somewhat cynical dictum – "be reinforced by the interests" of the parties concerned.  Yet the "moral alliance" of Europe, as Count Karl Nesselrode called it,  though it failed to secure the permanent harmony of the powers, was an effective instrument for peace during the years immediately following the downfall of Napoleon; and it set the precedent for those periodical meetings of the representatives of the powers, for the discussion and settlement of questions of international importance, which, though cumbrous and inefficient for constructive work, contributed much to the preservation of the general peace during much of the nineteenth century. 
Neorealism or structural realism is a theory of international relations that emphasizes the role of power politics in international relations, sees competition and conflict as enduring features and sees limited potential for cooperation. The anarchic state of the international system means that states cannot be certain of other states' intentions and their security, thus prompting them to engage in power politics.
An alliance is a relationship among people, groups, or states that have joined together for mutual benefit or to achieve some common purpose, whether or not explicit agreement has been worked out among them. Members of an alliance are called allies. Alliances form in many settings, including political alliances, military alliances, and business alliances. When the term is used in the context of war or armed struggle, such associations may also be called allied powers, especially when discussing World War I or World War II.
Regime change is the partly forcible or coercive replacement of one government regime with another. Regime change may replace all or part of the state's most critical leadership system, administrative apparatus, or bureaucracy. Regime change may occur through domestic processes, such as revolution, coup, or reconstruction of government following state failure or civil war. It can also be imposed on a country by foreign actors through invasion, overt or covert interventions, or coercive diplomacy. Regime change may entail the construction of new institutions, the restoration of old institutions, and the promotion of new ideologies.
A state's foreign policy or external policy is its objectives and activities in relation to its interactions with other states, unions, and other political entities, whether bilaterally or through multilateral platforms. The Encyclopedia Britannica notes that a government's foreign policy may be influenced by "domestic considerations, the policies or behaviour of other states, or plans to advance specific geopolitical designs."
A peace treaty is an agreement between two or more hostile parties, usually countries or governments, which formally ends a state of war between the parties. It is different from an armistice, which is an agreement to stop hostilities; a surrender, in which an army agrees to give up arms; or a ceasefire or truce, in which the parties may agree to temporarily or permanently stop fighting. The need for a peace treaty in modern diplomacy arises from the fact that even when a war is actually over and fighting has ceased, the legal state of war is not automatically terminated upon the end of actual fighting and the belligerent parties are still legally defined as enemies. This is evident from the definition of a "state of war" as "a legal state created and ended by official declaration regardless of actual armed hostilities and usually characterized by operation of the rules of war". As a result, even when hostilities are over, a peace treaty is required for the former belligerents in order to reach agreement on all issues involved in transition to legal state of peace. The art of negotiating a peace treaty in the modern era has been referred to by legal scholar Christine Bell as the lex pacificatoria, with a peace treaty potentially contributing to the legal framework governing the post conflict period, or jus post bellum.
In international relations, multilateralism refers to an alliance of multiple countries pursuing a common goal.
A secret treaty is a treaty in which the contracting state parties have agreed to conceal the treaty's existence or substance from other states and the public. Such a commitment to keep the agreement secret may be contained in the instrument itself or in a separate agreement.
A non-aggression pact or neutrality pact is a treaty between two or more states/countries that includes a promise by the signatories not to engage in military action against each other. Such treaties may be described by other names, such as a treaty of friendship or non-belligerency, etc. Leeds, Ritter, Mitchell, & Long (2002) distinguish between a non-aggression pact and a neutrality pact. They posit that a non-aggression pact includes the promise not to attack the other pact signatories, whereas a neutrality pact includes a promise to avoid support of any entity that acts against the interests of any of the pact signatories. The most readily recognized example of the aforementioned entity is another country, nation-state, or sovereign organization that represents a negative consequence towards the advantages held by one or more of the signatory parties.
The concept of balancing derives from the balance of power theory, the most influential theory from the realist school of thought, which assumes that a formation of hegemony in a multistate system is unattainable since hegemony is perceived as a threat by other states, causing them to engage in balancing against a potential hegemon.
In international relations, the security dilemma is when the increase in one state's security leads other states to fear for their own security. Consequently, security-increasing measures can lead to tensions, escalation or conflict with one or more other parties, producing an outcome which no party truly desires; a political instance of the prisoner's dilemma.
Collective security can be understood as a security arrangement, political, regional, or global, in which each state in the system accepts that the security of one is the concern of all, and therefore commits to a collective response to threats to, and breaches of peace. Collective security is more ambitious than systems of alliance security or collective defense in that it seeks to encompass the totality of states within a region or indeed globally, and to address a wide range of possible threats. While collective security is an idea with a long history, its implementation in practice has proved problematic. Several prerequisites have to be met for it to have a chance of working. It is the theory or practice of states pledging to defend one another in order to deter aggression or to target a transgressor if international order has been breached.
Realism is one of the dominant schools of thought in international relations theory, theoretically formalising the Realpolitik statesmanship of early modern Europe. Although a highly diverse body of thought, it is unified by the belief that world politics is always and necessarily a field of conflict among actors pursuing wealth and power. The theories of realism are contrasted by the cooperative ideals of liberalism in international relations.
In international relations theory, the concept of anarchy is the idea that the world lacks any supreme authority or sovereignty. In an anarchic state, there is no hierarchically superior, coercive power that can resolve disputes, enforce law, or order the system of international politics. In international relations, anarchy is widely accepted as the starting point for international relations theory.
The balance of power theory in international relations suggests that states may secure their survival by preventing any one state from gaining enough military power to dominate all others. If one state becomes much stronger, the theory predicts it will take advantage of its weaker neighbors, thereby driving them to unite in a defensive coalition. Some realists maintain that a balance-of-power system is more stable than one with a dominant state, as aggression is unprofitable when there is equilibrium of power between rival coalitions.
Defensive neorealism is a structural theory in international relations that is derived from the school of neorealism. The theory finds its foundation in the political scientist Kenneth Waltz's Theory of International Politics in which Waltz argues that the anarchical structure of the international system encourages states to maintain moderate and reserved policies to attain national security. In contrast, offensive realism assumes that states seek to maximize their power and influence to achieve security through domination and hegemony. Defensive neorealism asserts that aggressive expansion as promoted by offensive neorealists upsets the tendency of states to conform to the balance of power theory, thereby decreasing the primary objective of the state, which they argue to be the ensuring of its security. Defensive realism denies neither the reality of interstate conflict or that incentives for state expansion exist, but it contends that those incentives are sporadic, rather than endemic. Defensive neorealism points towards "structural modifiers," such as the security dilemma and geography, and elite beliefs and perceptions to explain the outbreak of conflict.
The San Francisco System is a network of alliances pursued by the United States in the Asia-Pacific region, after the end of World War II – the United States as a "hub", and Japan, South Korea, Taiwan, the Philippines, Thailand, Australia, and New Zealand as "spokes". The system is made of bilateral political-military and economic commitments between the United States and its Asia-Pacific allies. This system stands in contrast to a multilateral alliance, such as NATO.
Liberal institutionalism is a theory of international relations that holds that international cooperation between states is feasible and sustainable, and that such cooperation can reduce conflict and competition. Neoliberalism is a revised version of liberalism. Alongside neorealism, liberal institutionalism is one of the two most influential contemporary approaches to international relations.
The Western Union (WU), also referred to as the Brussels Treaty Organisation (BTO), was the European military alliance established between France, the United Kingdom (UK) and the three Benelux countries in September 1948 in order to implement the Treaty of Brussels signed in March the same year. Under this treaty the signatories, referred to as the five powers, agreed to collaborate in the defence field as well as in the political, economic and cultural fields.
Brett Ashley Leeds is an American political scientist. She is a professor of political science at Rice University, where she has also been the chair of the department. She studies how domestic politics affect international conflict and cooperation, as well as international institutions. She specializes in how alliances between countries function, and how they help countries prevent wars.
In international relations, credibility is the perceived likelihood that a leader or a state follows through on threats and promises that have been made. Credibility is a key component of coercion, as well as the functioning of military alliances. Credibility is related to concepts such as reputation and resolve. Reputation for resolve may be a key component of credibility, but credibility is also highly context-dependent.