Magneto

Magneto is a fictional character from Marvel Comics. He is the self-styled "Master of Magnetism" and can control any metal object, as well as fly and manipulate energy. Though he is typically a villainous character and a long-time enemy of the X-Men, Magneto has many times served as more of an anti-hero and has even at times worked with the X-Men against a common threat to mutantkind. Magneto has even spent time as a member of the X-Men and once taught at his old friend, Xavier,'s school before becoming more militant.

It must also be remembered that most of the time Magneto is working to protect his species and keep them safe from those who would do them harm and on this level is not that different from the X-Men, with their differing approaches being what divides them most of the time.

Nevertheless, Magneto strives to protect the mutant race and for both this and his tragic past many viewers and readers have actually sympathized more with Magneto and argued that he is a heroic figure who does what is required to keep mutants safe from a xenophobic world. It is worth mentioning that Stan Lee himself does not actually consider Magneto to be a villain, which only gives further credence to the idea of him being at least an occasional hero.

This does not mean Magneto is the same unambiguously good figure that the X-Men are. The character does lend himself to a certain amount of moral ambiguity, and has ultimately played the role of both hero and villain, switching sides regularly in his unending pursuit of assuring mutant survival at all costs.

In the game, X-Men Legends II: Rise of Apocalypse, he and his Brotherhood of Evil Mutants had no choice but to join the X-Men in order to defeat the far more villainous adversary otherwise known as Apocalypse.