Sandakan formerly known at various times as Elopura, is the capital of the Sandakan District in Sabah, Malaysia. It is the second largest town in Sabah after Kota Kinabalu. It is located on the east coast of the state in the administrative centre of Sandakan Division and was the former capital of British North Borneo. The town has an estimated population of 157,330 while the surrounding municipal area has a total population of 396,290.
Before the founding of Sandakan, Sulu Archipelago was the source of dispute between Spain and the Sultanate of Sulu for economic dominance in the region. By 1864, Spain had blockaded the Sultanate possessions in the Sulu Archipelago. The Sultanate of Sulu awarded a German consular service ex-member a piece of land in the Sandakan Bay to seek protection from Germany. In 1878, the Sultanate sold north-eastern Borneo to an Austro-Hungarian consul who later left the territory to a British colonial merchant. The German presence over the area raised concern among the British.