Iron-Man's attempt to destroy the Phoenix fragmented it and accidently five X-Men were zapped with the power. Makes you wonder what would have happenend if the Avengers would have zapped.
Some of the X-Men like Wolverine and Beast were already on the Avengers side. And after the Phoenix 5,... ehh Phoenix 4,... no Phoenix 2 more and more lost their marbles, their ranks swallowed up, till they all were fighting Dark Cyclops.
Captain America admitted at the end he done not enough for the mutants of America, resulting in the Uncanny Avengers which is a hybrid team, consisting to 50 % out of X-Men.
Waaaay back in Secret Wars vol 1 in the 80's on the Beyonder's Battleworld, the Avengers joined with the X-men and Magneto and first Magneto and then Wolverine called out Cap for his lack of standing up for mutant rights.
Now decades later, Cap finally realizes they were right.