He grew up in the village of Terchová in the Habsburg monarchy's Kingdom of Hungary area (present-day Žilina District in northwestern Slovakia). He fought with the Kuruc insurgents when he was fifteen. After the lost Battle of Trenčín, Jánošík was recruited by the Habsburg army. In autumn 1710, as a young prison guard in Bytča, he helped the imprisoned Tomáš Uhorčík escape. They formed a highwayman group and Jánošík became its leader at the age of 23, after Uhorčík left to settle in Klenovec. The group was active mostly in northwestern Kingdom of Hungary (today's Slovakia), around the Váh river between Važec and Východná, but the territory of their activity extended also to other parts of today's Slovakia, as well as to Poland and Moravia. Most of their victims were rich merchants. Under Jánošík's leadership, the group was exceptionally chivalrous: They did not kill any of the robbed victims and even helped an accidentally injured priest. They are also said to share their loot with the poor and this part of the legend may be based on the facts too.