Elf Wars

The Elf Wars was the four year long conflict between Doctor Weil's controlled Cyber Elf and Reploid forces, against the rest of the world, responsible for the near-extinction of the humans and Reploids.

It took place in the end of the Mega Man X storyline. Doctor Weil cursed the Mother Elf, turning her into the Dark Elf, and used her to create the Baby Elves and unleashed an attack to the rest of the world. Weil took the original body of Zero and created Omega, the "Devil Reploid", while Zero's brain (or soul) remained in another body.

In the last part of the Wars, X defeated the forces of Weil and banished him from X's newfound human utopia, Neo Arcadia.

But then X found out that the Dark Elf was too dangerous to still be in this world, so he sealed the Dark Elf with his own body (as mentioned in Mega Man Zero.), then splitting his soul into five parts, creating the Four Guardians- Sage Harpuia, Fairy Leviathan, Fighting Fefnir, and Hidden Phantom, while the 5th remaining Cyber-Elf and wandered around the world (and is believed to be the one who assisted Mega Man Zero).