The Sikh Empire (1799 - 1849) was established by Maharaja Ranjit Singh. Throughout its history, it fought various adversaries including the Durrani Empire of Afghanistan and the British East India Company. The Sikhs very commonly fought battles in which they had much less force than their foes. However, they had a pretty amazing success rate.
The Sikhs first raised their weapons against the oppressive Mughal Empire under Guru Hargobind. The tenth and the last Guru, Guru Gobind Singh organized Sikhs into a military sect called Khalsa (means "pure"), in 1699, against the atrocities of the Mughal emperor Aurangzeb. Before his death in 1708, he sent Banda Bahadur to lead the Sikhs of Punjab. Banda Bahadur through his outstanding leadership skills weakened the Mughal grasp over the eastern Punjab. But he was later captured and beheaded in Delhi in 1716, during the reign of Farrukhsiyar.
Thereafter, Sikhs became leaderless and were divided into Misls. Although their martial skills were enormous, their political disunity made them vulnerable to foreign attacks. In 1738, Nadir Shah of Iran, attacked India , looted Delhi and Mughals were never able to recover their power in Punjab. Later, Punjab was subject to constant invasions of Ahmad Shah Durrani of Afghanistan. During every invasion of Abdali, Sikhs were persecuted ruthlessly. The holy shrine of Harmandir Sahib was also razed to the ground.