Rivals Team Up

The Rival joins forces with The Hero for whatever reason. Usually, much awesomeness ensues because basically, these two are the most Badass guys in the entire story at this point (and God help you if they can perform a Fusion Dance). Can be both temporary (due to The Only One Allowed to Defeat You sentiment, mentioned in Back-to-Back Badasses) and permanent (a Heel Face Turn if The Rival previously served the evil side, especially when Fire Forged Friendship ensues).

Some genre-specific variations:
 * In Super Robot Sentai anime, this Heel Face Turn is usually permanent and The Rival gets a pilot seat in the titular Humongous Mecha alongside The Hero.
 * In the Magical Girl genre, this almost inevitably happens to the Dark Magical Girl.

The opposite of Rival Turned Evil. Bear in mind, however, that The Rival may not always be evil or an antagonist. He or she may simply be trying to one-up The Hero in doing good things. For generic cases of protagonist and antagonist (temporarily) teaming up against a common enemy, see Enemy Mine.

Anime and Manga

 * Vegeta And Goku, the original ones from Dragonball Z. When these two team up, there's very little that can stand in their way for long. And the result of their fusion... let's just say that he is able to (literally) punch out Cosmic Horrors, upon which nobody couldn't as much as land a hit before.
 * ...except that the original team-up was Goku and Piccolo, who put aside previous grievances (You Killed My Father) to take down Raditz. And by the end of the Raditz fight, Piccolo has gone from wanting Goku dead to trying to talk Goku down from his suicidal plan. And then upon learning of the threat posed by Vegeta, he even ends up training Goku's kid!
 * As noted, most examples of Dark Magical Girl do this sooner or later.
 * Happens many times in Magical Girl Lyrical Nanoha during its season finales. See Fate Storming the Castle with Nanoha in Season 1, the Wolkenritter joining forces with Nanoha's crew to curb stomp the out of control program about to blow up the world in Season 2, and  helping   defend the city in Season 3.
 * Happened in Eyeshield 21, when players from the various teams banded together to form an all Japanese team to compete in an international tournament held in America.
 * In Gundam Seed, where you have Kira and Athrun fighting to a draw in every engagement, until Athrun realizes that his motivation is false and joins with Kira who.
 * Similar to Kira and Athrun are Lelouch and Suzaku in Code Geass who team up on a few occasions throughout both seasons, despite becoming bitter enemies. In fact, Lelouch says many times that there isn't a single thing that they two cannot accomplish if they work together. Also note that neither of them can really be called "The Hero".
 * The oldest example is probably from Space Runaway Ideon, where spends most of the time hunting Ideon down, then is abandoned, captured by the Solo crew, and eventually allowed to co-pilot Ideon with Cosmo and Kasha.
 * Tengen Toppa Gurren Lagann parallels the above in case, as he is the only
 * Subverted somewhat with Gary Oak from Pokémon. He's still Ash's rival, in a sense, but he's on friendlier terms with him as well.
 * Played with in regards to Ash and Paul...they team up from time to time, but Paul never displays any desire to improve his relationship with Ash (or with anyone) during all of these.
 * In Fullmetal Alchemist, this happens very often. Ed and Al team up with Scar briefly to escape Envy and Gluttony during their first encounter with Father, and have another, much longer alliance when they need his help to translate research notes that they need to save the country—they even stage him kidnapping their childhood friend Winry, whose parents were killed by Scar, and who suggested the plan herself, no less, despite all three of them hating his guts. By the time the Promised Day comes about, Scar pulls a full-blown Heel Face Turn.
 * Scar also does this in the 2003 anime version. Despite killing dozens of State Alchemists, he saves Ed and Al's lives more than once. But he also plans to create a Philosopher's Stone by sacrificing hundreds of State troopers.
 * When Scar was making the stone, he and Ed were quasi-officially on the same side, with it being Ed's task to evacuate all the Lior citizens. (He'd also sent a letter to Central telling the troops not to invade, but Archer screwed that.)
 * There's also Episode 24, which is all about Scar and Al teaming up to save a young Ishvalan boy who had been captured. And of course, Laboratory 5.
 * At least three characters from Kenichi: The Mightiest Disciple function as The Rival to Kenichi, and given the rather idealistic nature of the series... This doesn't always overlap with Defeat Means Friendship (an otherwise rather frequent occurrence).
 * The most obvious case is, who is still thinks of himself as Kenichi's rival after his slow climb towards AntiHeroism. Additionally, there is  from YOMI, who runs into the wrong end of Redemption Equals Death near the end of the Tournament Arc. Even  looks to be on his way, given the Character Development he underwent between series 1 and series 2.
 * Also,  counts, given her strong (if one-sided) rivalry with Miu before she joined the Shinpaku Alliance.
 * Seto Kaiba and Yugi Moutoufrom Yu-Gi-Oh! end up having to work together on several occasions. Of course, they win. (The duel on the roof with the Rare Hunters during Battle City; the duel with Big Bad Dartz in the DOMA arc; at the end of the movie, Anubis has an You Have Outlived Your Usefulness moment with Kaiba, whom he's been influencing the whole duel, and Yugi and Kaiba team up to kick his ancient ass.
 * There's also Inuyasha and Koga, who end up fighting together against one of Naraku's incarnations on numerous occasions.
 * Or Inuyasha even teaming up with  to fight Naraku.
 * Naruto: Zabuza Momochi, after Haku dies. Unfortunately, Redemption Equals Death.
 * Whenever Naruto and Sasuke work together, either before or after the latters Face Heel Turn, asskicking ensues.
 * Negi and Kotaro in Mahou Sensei Negima do this to take down the demon Wilhelm. Kotaro ultimately joined the True Companions.
 * Bleach:
 * Ishida Uryu started out as a genuine Rival, but in spite of his constant insistence that he's still Kurosaki Ichigo's enemy, has put himself on the line for his companions multiple times. He even tells a Shinigami at one point that the Five-Man Band are True Companions -- "nakama", as if that explains why he's come to Soul Society  for people who supposedly mean nothing to him. Even though Hichigo   Ishida merely did his Deadpan Snarker schtick when Ichigo snapped out of it. But Uryu doesn't care. Really.
 * Also Ichigo teamed up with Renji against Aizen but they fail.
 * Byakuya and Kenpachi does this against only because he was in the way of their fight.
 * Suigintou joins up with Shinku in the manga reboot of Rozen Maiden to defeat the threat of Kirakishou. It still turns out inefficient as they are still not powerful enough to take on her.
 * By the end of the series, rivals Ranma and Ryoga of Ranma ½ spend almost as much time fighting on the same side as they do against each other, eventually settling into Friendly Enemy territory after a number of Enemy Mine situations. Mousse also joins them occasionally, especially against true Big Bads like Prince Herb and Saffron.
 * One Piece. Impel Down Arc. Enough to go around.
 * In the Sengoku Basara anime, two man army Date Masamune and Sanada Yukimura team up to take down [Big Bad Oda Nobunaga]]. Much ass is kicked.
 * Axis Powers Hetalia: the Allies definitely count as this. France, America, and England are not exactly enemies, but they do argue a lot; America and Russia are obviously on bad terms; China seems to look down on everyone except Russia ... the only thing they all have in common is that they're fighting the Axis.
 * Considering the show revolves around their rivalry, S-Cry-ed does this with Kazuma and Ryuho teaming up to defeat Conflict Killer Kyoji Mujo, much like the Devil May Cry example below. They even duke it out with each other after they defeated their common enemy!
 * In Fairy Tail, Gajeel and Natsu team up to defeat.
 * Also Lyon and Gray team up to defeat Racer.

Literature

 * Kal Zakath joins Belgarion's companions midway through The Malloreon, even though he spent The Belgariad and the first part of The Malloreon trying to stop him.
 * Gentleman Johnnie Marcone teams up with Harry Dresden in White Night, book nine of The Dresden Files while fighting ghouls in a natural Elaborate Underground Base owned by the White Court.
 * This is hardly the only time Marcone and Dresden join forces, and whenever they do, much awesomeness ensues. They don't do it often, however, since Dresden vigorously hates Marcone's guts and is probably the only living being of whom Marcone is genuinely afraid wary.
 * Gollum in The Lord of the Rings guides Frodo.
 * Honor Harrington: As of "A Rising Thunder",
 * The Importance of Being Earnest: Cecily and Gwendolyn have some wonderfully catty conversations before they find out each of their guys is lying.

Live Action Television

 * Given the nature of Star Trek, it shouldn't be surprising that this is an often-recurring plot line throughout every series. Examples include the original series episode Day of the Dove where Kirk has to convince a group of Klingons who are trying to take over the ship to work together against an alien presence who is feeding off of their emotions, as well as the entire series of Voyager, when in the pilot episode the titular ship is forced to integrate the crew of the Maquis vessel they were sent to capture, and the focus shifts to joining forces in an attempt to return home.

Video Games

 * In more recent Star Fox games, Wolf and Fox team up, though of course this is usually after a short dogfight between the two teams.
 * Miles Edgeworth from Phoenix Wright: Ace Attorney.
 * Interestingly, because it's illegal (or at least against the rules) for a prosecutor to help a defense attorney, and also because he's kinda Tsundere, every time Phoenix tries to thank Edgeworth for the help, Edgeworth just gets a little smile on his face and claims not to know what Phoenix is talking about.
 * Geo Stelar and in Mega Man Star Force 3.
 * Dante and Vergil of Devil May Cry 3 briefly team up to take down the Conflict Killer Arkham, then duke it out between just the two of them.
 * The two Ouendan teams do this in the climax of the sequel. It's pretty awesome to see.
 * Sega and Ninendo were huge rivals in the 16-bit days. After Sega's Saturn and Dreamcast failed thanks to the Nintendo 64, Playstation and Playstation 2, Sega now makes games for every system, including Nintendo.
 * Even wilder is the number of games featuring both Mario and Sonic, the mascots of the two formerly rival companies.
 * This seemed to be a selling point for F-Zero GX for the Gamecube (and its arcade counterpart AX.) An installment in a Nintendo series developed (at least partially) by Sega.
 * Sonic and Knuckles. Then later, Sonic and Shadow. Possibly, Shadow and Silver.
 * The protagonist ("Gold/Ethan" or "Soul/Lyra") teams up with the rival ("Silver") against Clair and Lance in Pokemon Heart Gold/Soul Silver. To writ, that's a grade-a Jerkass who's given you nothing but crap, teaming up with the happy-go-lucky protagonist against a Gym Leader and the Champion. If you win,
 * Meta example: Squaresoft and Enix were the two names to know in the JRPG industry, and their flagship franchises were the eternally Dueling Franchises Final Fantasy and Dragon Quest. Then they merged, forming Square Enix.
 * In The King of Fighters, Kyo and Iori, heirs to rival clans and flame wielders, have been bitter rivals for the whole series, but they teamed up back in 97 to help Chizuru bring down Orochi. They once again join forces in 2003 and XI and both have a vendetta against Ash Crimson by XIII.
 * In the opening cutscene for Magic: The Gathering, Duels of the Planeswalkers 2012, Gideon Jura convinces his rival planeswalkers to combine their forces to help him defeat Nicol Bolas.
 * Happens on both sides in Mortal Kombat vs. DC Universe. The superheros work with the villains of the DC Universe, while Liu Kang and Raiden are forced to work with the likes of Shang Tsung and Kano. At the end, Raiden and Superman, who each thought the other was an enemy, then team up to take down Dark Kahn (a fusion of Darkseid and Shao Kahn).

Western Animation

 * Exo Squad is a complex case: we have the Neosapien Ace Pilot Thrax who is The Rival of sorts to The Squad (particularly, Kaz Takagi). In the end of the second season, Thrax realizes the pointlessness of the war and disbands his garrison, effectively pulling a Heel Face Turn without directly facing the heroes.
 * Word Girl's titular character and the villainous Dr. Two-brains work together to stop Glenn, Two-Brain's crazed Fan Boy gone bad, trying to one-up Two-brains' every scheme in some minor way.
 * Teen Titans has done it twice with Robin. Once with Slade, and once with Red X. Unsurprisingly, Ass-kickery ensued.

Real Life

 * LeBron James and Dwyane Wade.
 * Hundreds of thousands of years ago, both primitive humans and wolves had become two of the most successful top level predators on earth, forming complex social groups and hunting in packs, bringing down prey much larger than themselves. At some point some people must have figured out that local wolf packs did not have to be rivals for the same territories, and using similar tactics and social structures made working as a team possible. And it turned out to work very, very, well for them.
 * During the 19th and early 20th century, the small Australian town of Eden at Twofold Bay had been home to several small groups of whalers who hunted whales in small rowed boats from the coast. The whalers often got into conflict with a local group of orcas that hunted in the area and often tried to snatch away the whalers catches. Apparently the Davidson and Greig families were much nicer to the orcas and stuck to using rowed boats and hand thrown harpoons, so the orcas started to drive their prey near the Davidsons home and keep it from escaping until the humans got their boats out to kill the whales. The orcas where then allowed to eat the easily reachable parts of the dead whales before the humans would pull them to shore and cut up the much larger rest of the bodies. Being among the smartest animals in the world, the orcas eventually began to send one of them ahead to alert the humans that the main group was on their way driving a group of whales into the bay. They were also known to often play with the boats by grabbing ropes hanging in the water, and reportedly even pulled the boats on occasion, as they swam much faster and easily had the size and strength required for it.
 * The Spanish national soccer team of 2008-2011 (and as of 2011 still going strong) is a successful combination of the best Spanish players from the rival teams of Real Madrid and FC Barcelona, two teams with a long history of hating each other. For much of the Spanish national soccer team's history, a major flaw was often an inability for Real Madrid and FC Barcelona players to work well together. In 2008, coach Aragones worked to unite the two traditional foes, and they cruised their way to a dominant win of the Euro Cup 2008 and the World Cup 2010.
 * Americans and Russians VS Germany in WW 2. Many WW 2 veterans and historians often cite the result of this trope as the reason for Germany's defeat being inevitable after 1941. Interestingly enough, the two superpowers would pull off this trope again In Space via the International Space Station. In fact, there's a rather surprising degree of cooperation amongst rivals (and even allies) in space programs; considering the nature of space operations, though, this strategy is extremely successful.
 * The Steagles, a 1943 alliance of longtime rival NFL teams from Pennsylvania when most of their regular players were drafted to fight World War II. Cracked.com's The 5 Most Insane Teams in the History of Sports calls the concept "too stupid even for a sports movie".