Yojimbo

In 1860, during the final years of the Tokugawa shogunate, a rōnin (masterless samurai) wanders through a desolate Japanese countryside. While stopping at a farmhouse, he overhears an elderly couple lamenting that their only son has given up farm labouring in order to run off and join the rogues who have descended on a nearby town that has become divided by a gang war. The stranger heads to the town where he meets Gonji, the owner of a small izakaya who advises him to leave. He tells the rōnin that the two warring clans are led by Ushitora and Seibei. Ushitora was the right-hand man of Seibei, but rebelled when Seibei decided to hand over the reins to his son Yoichiro, a useless youth. The mayor of town and silk merchant, Tazaemon, had long been in Seibei's pocket, and Ushitora aligned himself with the sake brewer, Tokuemon, proclaiming him the new mayor. After sizing up the situation, the stranger says he intends to stay as the town would be better off with both sides dead. Read more on Wikipedia.