The Babylon Treaty was an agreement signed between the newly-independent Babylon 5 and the League of Non-Aligned Worlds in July, 2260. It would eventually lay the groundwork for the Interstellar Alliance.
After John Sheridan declared Babylon 5's secession from the Earth Alliance, the station effectively cut itself off from all support from Earth and the other colonies. In an effort to provide alternate support to the fledgeling city-state, he and the rest of the command staff began working on a plan involving the League and the members of the former Babylon 5 Advisory Council. With Babylon 5's primary source of income coming from docking fees and associated revenue sources, they had to find a way to increase the station's throughput while at the same time guaranteeing the station's safety.
The treaty stipulated that the League worlds send ships to protect Babylon 5 in exchange for the continued operation of Babylon 5 as a neutral port of call. As there were numerous border wars going on at the time due to the influence of the Shadows, the treaty also stated that no two League ships from opposing sides would be stationed there at the same time. With their own ships helping to protect the station, the alien governments and transport concerns would be more willing to use Babylon 5 as a hub of travel and trade.
When the Shadows were outed as their enemy, the League worlds united under the Babylon Treaty in a mutual-defense effort. This gradually built up into a unified force standing against them, as they knew they would eventually have to go to open war. The League worlds learned how to work together and cooperate for their survival. This took several months to accomplish, during which time the League worlds were unwilling to commit ships to offensive actions against the Shadows. Only through the motivating words of G'Kar, they were brought around to help Sheridan in the Battle of Sector 83, the League's first victory against them.
After the destruction of the Shadow's capital city on Z'ha'dum and the apparent death of Sheridan, there came a lull in the war. In early 2261, many of the League worlds stopped holding up their end of the treaty, withdrawing their ships to aid in the defense of homeworld. Despite the efforts of Susan Ivanova and Delenn, the League was unmoved and almost broke the treaty altogether before the reappearance of Sheridan, who united them into a singular force to stop both the Shadows and the Vorlons from interfering with the development of the younger races once and for all.
With the Shadows defeated and - later - the toppling of the xenophobic Clark regime on Earth, the League was rebuilt into the Interstellar Alliance, with the Babylon Treaty as a foundation. The treaty continued to be in operation during the early years of the ISA, where the member worlds helped defend the Alliance's temporary headquarters: Babylon 5.