The War of the Magi was a cataclysmic war in the backstory of Final Fantasy XIV. It culminated in the Sixth Umbral Calamity, also known as the Great Flood, and happened between 3,000 and 1,577 years ago in Eorzea during the height of the Fifth Astral Era.
Fifth Astral Era
During the Fifth Astral Era, Eorzea was dominated by three major powers: the scholars of Nym in Vylbrand, the white mages of Amdapor in Twelveswood, and the void mages of Mhach in Yafaem. For unclear reasons, a war broke out, with Mhach utilizing increasingly destructive applications of voidsent to combat their foes. The Mhachi tricked a Nymian sea galley into bringing an ampoule to their home nation containing a voidsent named Bitoso who unleashed a devastating plague called the "Green Death" that transformed many Nymians into tonberries. The mages of Amdapor developed White Magic to counteract the dark arts used by Mhach, sealing away the voidsent Diabolos when he was sent to attack Amdapor.
This wanton abuse of the lands' aether tipped the balance in favor of water (the other elements having been used extensively in the conflict). Accounts in the original version of the game attributed the flood to the wrath of the elementals, their collective wrath spawned Oha-Sok, an unaspected Elemental that decided to eliminate the warring factions with a catastrophic flood. However, more recent depictions of these events in Encyclopaedia Eorzea claim that the elementals did not take any action during or after the War of the Magi, save to cover the ruins of Amdapor in forest, creating what is now South Shroud.
The Great Flood
The people of Nym similarly fled to a small settlement in the mountains of Vylbrand while their Royal Marines enacted Operation Maelstrom in a vain attempt to protect their maritime city-state from the deluge. Nym was destroyed, however, weathering only the first tidal wave before being washed away in the subsequent ones.
The Mhachi attempted to ride out the rising waters by building an airship powered by a thousand voidsent. However, even the mightiest voidmages could not contain its main power source, the voidsent Scathach, and the vessel became a derelict in the Sea of Clouds.
The small nation of Skalla was located in a natural steep-walled ravine in Gyr Abania, and the rising sea waters drowned the city-state but had nowhere to drain when the waters receded, resulting in the creation of saltwater lakes known as the Lochs.
The calamity was the result of Ascians causing one of the shard reflections of Hydaelyn to leak out the aether used in the flood, and that world was absorbed into the Source. In time, the recession of the flood waters led to the Sixth Astral Era with the rise to the modern city-states of Ishgard, Limsa Lominsa, Ul'dah, and Gridania. The Elementals maintained a tight grip over the Twelveswood, who only permitted Gridania's existence through their mediators, the Seedseers.
In the fifteen centuries of the Sixth Astral Era, the great flood became a distant memory. Its legacy was only truly rediscovered when remnants from Sixth Umbral Era were unearthed by Bahamut's fury during the Seventh Umbral Calamity.