The idea bases itself on the media's perception of the samurai and ninja of Japan holding to opposing ideals, and yet both being considered badass by the general public for their seemingly superhuman feats, skills and philosophies, even to the point of being historically inaccurate, especially in anime/manga. In Real Life, the samurai and ninja were not mutually exclusive classes; most ninjas were actually samurai themselves.
The widespread belief that ninjas were initially peasants that utilized various forms of farm equipment, as well as their knowledge of the land to combat the tyranny of oppressive samurai, is often exaggerated. Nevertheless, there are many mythical Ninjas, most famously Ishikawa Goemon who is said to have robbed from tyrannical ruling class to give to the poor.
Regarding this trope, usually one or the other is the protagonist while the other is the antagonist (sometimes the latter appears as an army of mooks). When the samurai is the protagonist, more often than not, s/he is a master swordsman who is either humble, or the silent type, able to slice a speeding bullet in two without even so much giving a snarl, as s/he cuts armies of ninja down with a single swipe. As a mook? Usually the samurai is just a loud, bullying dumbass with a sword... live and learn.
In contrast, the ninja protagonist is clever and capable of numerous death traps and tactics, even using occult wizardry sometimes to literally burn through the opposition. As a mook? Slithery shadow thugs who're good at killing, but terrible when facing the samurai one-on-one.
Rare, but not impossible however, is the concept of both samurai and ninja protagonists working double-team, helping each other balance out weaknesses, but usually arguing about principles and combat stratagem. Regardless, when combined, armies tend to fall faster than sakura petals in a stiff breeze.
- The Land of Iron, unlike the other lands in Naruto, has samurai (who look like Stormtroopers) instead of Ninja. This makes the Land of Iron a useful neutral ground for the leaders of the ninja villages to hold a summit. The samurai are fairly competent, using Chakra to create energy blades and seem to possess the same superhuman feats as the Ninja (minus Elemental abilities) but the regular samurai suffer from wearing face-concealing masks and lacking names as can be seen by the few Sasuke encountered and killed. Their leader Mifune, however, is able to hold his own against Hanzo, who was one of the most powerful ninja in the world. Mifune's specialty is using iaijutsu to disrupt ninja hand seals (required for the majority of their superhuman techniques), and is so fast on the draw that Hanzo concedes that attempting those techniques against him would be pointless.
- In Nabari no Ou, most of the main characters are ninja, but Raimei and Raiko identify themselves as samurai.
- In Samurai Champloo one of the main characters is a Ronin, a masterless samurai. Several ninja-like characters make appearances during the show and generally give the characters a fair run for their money, but the only person outright stated to be one is the baseball-loving, sunglass-wearing ninja in episode 21, who ends up shanghaing the main characters to play a game of baseball against a US invasion of Japan. In the 17th century.
- In Samurai 7, a group of ninjas live under the city that the main characters visit, and threaten to destroy said city if not appeased with bribes.
- The OAV Ninja Scroll has a Ronin named Kibegami Jubei fighting against multiple ninjas, from masters whose magical skills have turned them into monsters to Faceless Mooks.
- The Lupin III episodes and movies that focus on Goemon, such as The Fuma Conspiracy and Dragon of Doom, often have ninjas as enemies.
- An example shows up in The Last Samurai, though it would probably be more accurate to describe the whole scene as "Ninja in Samurai Town". The Imperial Japanese government sends a team of ninjas to infiltrate the village where Lord Katsumoto (the leader of a group of samurai rebels) is residing to try and kill him, though the assassination attempt fails.
- Wolverine is technically a Ronin, and a clan of Ninjas serve as antagonists in The Wolverine, therefore...
- In Shogun, everyone believes that the target of the ninja attack is the Anjin-san (the gaijin samurai). In reality, it's the Lady Mariko. Not that it matters, because the castle is full of samurai, and the ninjas are attacking in force.
- In the Young Samurai series, Jack, the son of an English sailor, is orphaned by evil ninja and adopted by a samurai, who raises and trains him with the belief that all ninja are evil. Later in the series, Jack finds himself in a ninja village, where he learns for himself that they are Not So Different.
- Every ninja themed series of Super Sentai and its adaptation Power Rangers make at least some connections to samurai.
- The first Combining Mecha of Ninja Sentai Kakuranger, the Muteki Shogun (adapted as Shogun Megazord in Mighty Morphin' Power Rangers), looks like a giant hulking samurai. The extra hero Ninjaman (known as Ninjor in ''MMPR'') makes it even more explicit, having the ability to to transform into "Samuraiman".
- Several of the larger combinations of mecha in Ninpuu Sentai Hurricaneger and by extension Power Rangers Ninja Storm look like samurai in an otherwise Ninja themed show. The Sixth Ranger in Ninja Storm plays this trope up, as he is called the Green Samurai Ranger, while his mecha is called the Samurai Star Megazord, despite his Sentai predecessor being a ninja like the rest of the team.
- Power Rangers Samurai manages to sneak this trope in, despite its source, Samurai Sentai Shinkenger having managed to avert this trope. When the Samurai Rangers morph, the Transformation Sequence first shows them wearing a stereotypical ninja outfit before donning their ranger suits.
- Several of the main villains in Shuriken Sentai Ninninger are based on samurai, while the heroes are all ninjas. Kibaoni Gengetsu, the Big Bad, is even stated to have been a human samurai warlord before turning into a demon. Power Rangers Ninja Steel downplays this trope, as all of the villains are aliens playing in an intergalactic gladiator game, with the Big Bad Galvanax being the current reigning champion.
- The 1986 game, Mr. Goemon, based on Goemon Ishikiwa, has the Ninja protagonist face many Samurai Mooks. Several of the later entries in the franchise feature Samurai enemies as well as honest ones.
- Tenchu puts players in the shoes of a ninja with plenty of samurai Mooks to assassinate.
- Muramasa: The Demon Blade has both ninja and samurai as enemies and allies at various points. The protagonists are a ninja and a princess who's possessed by the spirit of a samurai.
- Musashi Samurai Legend has Musashi, the heroic samurai, against endless Mooks of Ninjaroids, which is Exactly What It Says on the Tin; Ninja Androids.
- Many samurai in Sengoku Basara have ninjas who serve them, so both types of character turn up as playable characters and enemies.
- The "working together" variation of the trope is played with in Overwatch. Particularly because the samurai (Hanzo) and ninja (Genji) in question are both brothers who may or may not end up on the same team. Whichever one is the "mook version" of either class largely depends on player skill. Story wise, Hanzo almost killed Genji ironically before the latter became a ninja proper while the former then became akin to ronin out of guilt. Both however, are portrayed as trying to do the right thing.
- Being set in the Sengoku era, Total War: Shogun 2 allows the player to command both samurai and ninja. While samurai fight in battles, there are multiple ninja types. Some fight on the battlefield, others sneak around the overworld map and assassinate enemy generals, or sabotage city gates.
- League of Legends had quite a few ninja of various schools and orders (and one samurai-esque swordsman) before introducing a true samurai/Ronin archetype in Yasuo. He doesn't have much respect for any of them.
Yasuo: Scurry back to your shadows, ninja.
- Samurai Jack faced a ninja (a robot ninja, no less) in the episode titled "Jack vs. the Ninja". The episode played up the contrast between them by having either Jack hiding in the light or the ninja hiding in the shadows at all times, making for one of the more visually spectacular fight scenes on the show.
- In Ninjago we have Samurai X, a mysterious high-tech samurai that pilots a Humongous Mecha and acts as a kind of rival to the ninja. After the Samurai is revealed to be Nya, she becomes a much more active ally and a major part of the team.
- This trope takes inspiration from Real Life (and not just Japanese history) as it makes sense for warrior leaders (samurai) to send assassins (ninja) against their rivals before or in lieu of facing them on the battlefield.
- As mentioned in the intro myths about Ishikawa Goemon have the Ninja thief facing off against Samurai in service of evil lords.
- Hattori Hanzo is one of the most well known ninja in history. However, in reality, he's a Samurai first who just happened to command a battalion of ninja, he made his debut during the Battle of Anegawa and prefers to ride into battle with spear. His ninja battalion is from his homeland of Iga, therefore he's a literal example of the trope.