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; many 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—though not inaccurate: after all, many historical mountain/forest communities in the Sengoku period functioned as ninja clans or armed neighborhoods, resisting against (if not partnering with) the dominion of conquering samurai. The most notorious of these conflicts, understandably, would be Oda Nobunaga launching the Tensho Iga War), which the ninja clans actually won during the first round. 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.
See also Samurai Shinobi.
- In the Land of Waves Arc, Naruto and co face off against a bunch of ronin-mooks working for Gato. They're pretty vastly inferior to the ninja featured in the arc, including the other ones Gato hired.
- The Land of Iron relies on a military of samurai (who look like Stormtroopers) instead of Ninja, like the other countries. 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 Rōnin, 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 Rōnin 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.
- One Piece: Wano Country is an isolationist island nation in the New World based on Feudal Japan that heavily features both Samurai and Ninjas as the primary solider/warrior class in their society. These Samurai and Ninja are the primary reason that Wano has remained isolated from the rest of the world for centuries, as they are considered extremely powerful fighters to the point that even the globally dominant World Government is fearful of them.
- 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 Lady Ninja Kaede, a ninja possessing special secret techniques is released from house arrest to deal with a group of samurai committing rape with impunity. Along the way, she acquires an apprentice.
- 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.
- Young Samurai: 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 aren't that different and even undergoes ninja training himself.
- 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/Rōnin archetype in Yasuo. He doesn't have much respect for any of them.
Yasuo: Scurry back to your shadows, ninja.
- Final Fantasy XIV introduced Ninja as a playable class late into the content cycle of A Realm Reborn. Come Stormblood and its focus on Eorzea's far eastern regions, Samurai is included as another playable class.
- Ensemble Stars! includes a character based on ninjas - Shinobu, a Chuunibyou who loves ninja stories - and another based on samurai - Souma, who comes from a very old-fashioned samurai family. The two however are friends, as Shinobu is a sweet and hard-working kid who looks up to Souma, who often praises him and enjoys looking after him. This trope comes into play in the story Scroll of the Elements, in which their units team up to put on a joint performance where Ryuuseitai dress as ninjas trying to steal a scroll supposedly proving the lord's infidelity from a castle and Akatsuki dress as samurai trying to protect their lord. However, in the story the two groups eventually decide that the whole matter isn't worth risking their lives for, and then when the samurai from another lord appear to try and take over the castle, they team up to fight back. Shinobu and Souma discuss this, agreeing that it's a common plot in stories where heroes with different ideas of justice meet that they realise their common goal and team up, whether that be ninja and samurai from period dramas or Tokusatsu heroes and American comic book superheroes, too.
- Averted in Ghost of Tsushima, which has plenty of samurai but the word "ninja" is never used, even as Jin Sakai experiments with the kind of stealthy, pragmatic routine that ninja are known for. Justified by the setting, which is long before the rise of ninja as a concept. Jin is actually inventing being a ninja with his "Ghost weapons" and "Evolving Tactics".
- Played straight if you regard this as Jin's internal conflict. In the beginning he watches the Samurai be cut down on the beaches of Tsushima by the Combat Pragmatist Mongols and suffers his own personal failure trying to rescue his uncle, after which he is humbled and reconsiders his approach. The narrative and rewards of the first act favour the Ghost, and Jin's allies will either approve or disapprove of the dishonourable tactics and persona he adopts. After rescuing Lord Shimura halfway through the game, the old man tries to lure Jin back to a return to the Samurai way and subsequently this playstyle becomes viable - but a player set in the ways of the Ghost can continue to use cloak and dagger if they wish. With the conclusion of the second act and another embarrassing defeat caused by Shimura's stubborn adherence to a mindset that the Mongols are all too clearly eager to exploit, Jin hits the Godzilla Threshhold and rebels against his uncle. At this point, Jin is determined to drive the Mongols back into the sea even if he has to publicly piss on the tenets of Bushido and so the negative stigma against Ghost tactics is removed; whether Jin adopts the Ghost only reluctantly, or as his go-to method, is the player's final decision.
- Shadow Tactics: Blades of the Shogun has Hayato, the cold Professional Killer who is only in it for the money at first, vs. Mugen, the big Boisterous Bruiser Nice Guy Samurai. Mugen thinks little of Hayato's detached nature but respects his abilities, and Hayato thinks Mugen is a brash idiot but takes his suicide poorly. There is also a female ninja named Aiko (whose skills are centered on subterfuge and misdirection rather than stealth), but she is Mugen's lover.
- 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 Hanzō is one of the most well known ninja in history. However, in reality, he was a Samurai first who just happened to command a battalion of ninja. He made his debut during the Battle of Anegawa and preferred to ride into battle with a spear. His ninja battalion was from his homeland of Iga, therefore he's a literal example of the trope.