The Dal Khalsa fought against the Mughals and the Afghans, eventually resulting in the establishment of a number of small republics called misls (autonomous confederacies) and later in the formation of the Sikh Empire.