An “ally” typically refers to a nation-state formally joined by treaty with another nation-state for some purpose, usually military related. Alliances date back to ancient times. For example, Athens and Sparta, as well as other Greek city-states, allied against Persia in the fifth Century B.C.E. One of the most notable military alliances of today is the North Atlantic Treaty Organization, or NATO, in which the United States, Canada, and many European nations promise to defend each other against attack.
In the early and mid-20th century, alliances of note included the Allied and Central Powers of World War I, and the Allies of World War II.
World War I was a struggle between powers bound by alliances: the allied powers (initially Britain, France, and Russia) and the Central Powers, initially Germany and Austria-Hungary.
In the years before the war, Germany, Austria-Hungary, and Italy joined together in an alliance called the Triple Alliance. To balance the Triple Alliance, France and Russia allied in what became known as the Dual Alliance. Britain and France subsequently reached an agreement known as the Entente Cordiale ("entente" meaning friendship or agreement in French). The Entente Cordiale was not itself a military alliance, however. At the same time, Britain and Russia came to an understanding over central Asian colonial differences, in the Anglo-Russian Entente of 1907. The resulting relationship between the three nations was referred to as the Triple Entente.
In August of 1914, when Austria-Hungary declared war on Serbia, Russia mobilized against Austria-Hungary. Germany intervened on behalf of its ally Austria-Hungary, and France stepped in on behalf of its ally, Russia. Italy remained neutral. Britain stayed out of the conflict until Germany invaded Belgium (on its way to France), which Britain had a commitment to defend. Britain subsequently formally joined with France and Russia as allied powers pursuant to a new Treaty of London. Germany and Austria-Hungary came to be known as the Central Powers.
Ultimately, Italy and Japan joined the allies, while Bulgaria and the Ottoman Empire joined the Central Powers. The United States entered the war in 1917 on the side of the allies, as an associated power, rather than one bound formally by treaty.
World War II also saw a tangle of alliances. In 1939, Britain and France had committed to defend Poland against German aggression. In August of that year, Germany and the Soviet Union signed a secret pact to divide Poland, and invaded on September 1. Following this, Britain and France declared war on Germany. Thus, at the outbreak of war, the Allies were Britain (and the British Empire), Poland, and France.
The Soviet Union joined the Allies in June of 1940, after Germany invaded the Union. The United States joined the Allies in 1941 after the Japanese attack on Pearl Harbor. Ultimately, the term “Allies” came to include all the nations that signed the Declaration of the United Nations in 1942.
Against the Allied Powers stood the Axis Powers of Italy, Germany, and Japan, who had signed the Tripartite Pact in 1940. The agreement committed each nation to assist the others in the event that they were attacked by a nation not currently at war with any of them, for example, the United States. In the end, the United States went to war with Japan following Japan’s attack on Pearl Harbor, which led Germany to declare war on the United States in return.