The story is set in 1888. The Sign of the Four has a complex plot involving service in East India Company, India, the Indian Rebellion of 1857, a stolen treasure, and a secret pact among four convicts ("the Four" of the title) and two corrupt prison guards. It presents the detective's drug habit and humanizes him in a way that had not been done in the preceding novel A Study in Scarlet (1887). It also introduces Doctor Watson's future wife, Mary Morstan.