Marvel's big comic event at the moment is Avengers v X-Men. In the answer to another question, the Avengers were mentioned as being somewhat anti-mutant. That obviously seems to potentially set them in opposition to the X-Men generally. Have these two teams clashed before, and if so, where and when?
The X-men and the Avengers have squared off over the decades in a variety of skirmishes:
And Justice for All: A 1986 four issue limited series run of the X-men vs Avengers. Magneto battles against the Avengers and the Soviet Super Soldiers.
- Avengers: Black Knight, Captain America, She-Hulk, Photon, Dr. Druid, Thor
- X-men: Wolverine, Havok, Storm, Dazzler, Rogue
- Soviet Supersoldiers: Gremlin, Crimson Dynamo, Vanguard, Darkstar, Ursa Major and Titanium Man
Asteroid M Storyline: Magneto rebuilds his space station Asteroid M and decides to bring his daughter the Scarlet Witch back to the station with him. The West Coast Avengers lead an attack on his station to recover their team member.
- Uncanny X-Men #5, 113, 299 & 378 (May 1964, September 1978, April 1993 & March 2000, Marvel Comics)
- New Mutants, vol. 1 #21 (November 1984, Marvel Comics)
- New X-Men #146 & 148 (November 2003 & December 2003, Marvel Comics)
- Avengers: West Coast #57 & 60 (April 1990 & July 1990, Marvel Comics)
- X-Men, vol. 2 #1–3 (October 1991–December 1991, Marvel Comics).
"Bloodties": a 1993 Avengers/X-Men crossover and a direct sequel to the X-Men "Fatal Attractions" story line. It details the fallout from Charles Xavier's infamous mindwipe of Magneto and Magneto's ultimate defeat. The story details a civil war between the human and mutant populations of Genosha, incited by Magneto's former protogé Fabian Cortez. Unaware of Magneto's incapacitation, Cortez attempted to shield himself from his former master's wrath by kidnapping Magneto's granddaughter Luna. However, as Luna's father Quicksilver had strong ties to the X-Men and her mother Crystal was a member of the Avengers, both teams became involved in the Genoshan conflict.
- Avengers (vol. 1) #368 (1993) (Part I)
- X-Men (vol. 2) #26 (1993) (Part II)
- Avengers West Coast #101 (1993) (Part III)
- Uncanny X-Men #307 (1993) (Part IV)
- Avengers (vol. 1) #369 (1993) (Part V)
During the Onslaught Saga: Onslaught is a psionic entity, revealed to have been created from the soul of Professor X and Magneto, when the dark part of Magneto's soul leapt into its counterpart in Xavier's soul. This took place when Xavier wiped Magneto's mind at the conclusion of the Fatal Attractions storyline, after Magneto tore the adamantium out of Wolverine's body.
After kidnapping Franklin Richards and Nate Grey, usurping their psionic powers to greatly increase his own, changing his physical form, Onslaught fights the Avengers, Fantastic Four, the Hulk, and the X-Men (Spider-Man attempted to get involved in the fight, but he was kept occupied by fighting Onslaught's Sentinel forces).
This fight mostly devolves into an everyone versus Onslaught but it was one of the major battles that defines mutants as a threat to everything and everyone on Marvel Earth. Several of the Avengers are believed killed during this event.
- X-Men: Prime #1
- Uncanny X-Men #322
- X-Men (vol. 2) #53
- X-Men (vol. 2) #54
- Onslaught: X-Men
- X-Man #10
- Fantastic Four #414
- X-Man #19
- Onslaught: Marvel Universe
They clashed once in 1987 (before I was born!)
Magneto seeks to remove prejudice from all humanity while the Soviet Super-Soldiers and the Avengers seek to bring him in for his past crimes
And Comic Vine
The Uncanny X-Men and Earth's Mightiest Heroes square off! When Magneto seeks to recover fragments of Asteorid M, the Avengers step in to investigate. Unsure of his intentions, they seek to bring him to trial before the World Court in Paris. Fortunately for Magneto, his teammates in the Uncanny X-Men step in to defend him no matter what the cost. These two teams face off and also have to deal with the Soviet Super Soldiers!
Note however this was just due to Magneto it seems and isn't really comparable to the current AvX clash of ideals and the fear of the phoenix force.
They also clashed (kinda) during the Secret Wars. At that point Magneto was a part of the X-Men and was transported along with the other X-Men to Battleworld. The other heroes, made up from the Avengers, the Fantastic 4 and Spiderman questioned Magneto's role as one of the 'heroes' and so the X-Men set themselves up as an independent group separate from the hero and villain teams. Although I don't think there were any physical altercations, there was certainly tension and arguments between the Avengers (and the other heroes) and the X-Men.