In May 1857 Indian troops near Delhi mutinied against their British officers. Within a few weeks the British had lost control of much of northern India - it took two years to regain control.
Indian officers fed up with poor pay, limited career opportunities and racist treatment led the mutiny. They found allies in local rulers whose land was being annexed by the British, often illegally.
Only eight days before the mutiny, a senior British administrator in India had written prophetically to Governor-General Canning that 'Until we treat Natives, and especially Native soldiers, as having much the same feelings, the same ambition, the same perception of ability and imbecility as ourselves, we shall never be safe.' Both the British and Indians engaged in brutal warfare that killed many civilians.
Dalrymple, William (2006). The Last Moghul: The Fall of a Dynasty, Delhi, 1857, Bloomsbury, London.
David, Saul (2002). The Indian Mutiny 1857, Viking, London.