Inspired by the historical rivalry between the Genji and Heike clans, which ushered in the era of samurai dominance in Japanese history, Sukiyaki Western Django is set "a few hundred years after the Genpei War". The Genji and Heike gangs face off in a town named "Yuta" in "Nevata", when a deadly gunman comes into town to help a prostitute get revenge on the warring gangs. The film contains numerous references both to the historical Genpei War and to Wars of the Roses, as well as the films Yojimbo and Django.