The film is set in the 17th century during the Swedish invasion of the Polish-Lithuanian Commonwealth, known as The Deluge, which was eventually repulsed. However, a quarter of the country’s population died through war and plague, and its economy was greatly damaged.