As the Durrani realm raided the Punjab again and again in the mid-18th century, the Sikh misls (warrior brotherhoods) made themselves free. In 1799 Ranjit Singh took Lahore, within a decade united the misls, and in 1801 was crowned maharaja of the Punjab - a Sikh Empire running west to Peshawar and north to Kashmir; he drilled a standing army on European lines and kept Sikhs, Hindus and Muslims together in service. After his death in 1839 the court fell to faction and the army to its own council; the two Anglo-Sikh wars (1845-46, 1848-49) were lost in turn, and in 1849 the Punjab passed into the British Raj. Its banners and coinage ended, but the Sikh martial tradition runs to this day.
Editorial note on dating Ranjit Singh took Lahore in 1799 and unified the Sikh misls (crowned 1801), holding Kashmir and Peshawar; after his death (1839) the state fell to two Anglo-Sikh wars (1845-49), annexed to the British Raj.