Sabah or North Borneo was part of the Sultanate of Brunei around the early 16th century. This was during the period when the Sultanate's influence was at its peak. In 1658 the Sultanate of Brunei was purported to have given the north-east portion of Borneo to the Sultan of Sulu as a "gift" in return for the latter's help in settling a civil war in the Brunei Sultanate. In 1761 an officer of the British East India Company, Alexander Dalrymple, concluded an agreement with the Sultan of Sulu to allow him to set up a trading post in the region. This attempt together with other attempts to build a settlement and a military station centering around Pulau Balambangan proved to be a failure. There was minimal foreign interest in this region after this failure and control over most parts of north Borneo seem to have remained under the Sultanate of Brunei.
In 1865 the American Consul of Brunei, Claude Lee Moses, obtained a 10-year lease over North Borneo from the Sultan of Brunei. Ownership was then passed to an American trading company owned by J.W. Torrey, T.B. Harris and some Chinese merchants. They had set up a base and settlement in Kimanis but this too turned out to be a failure due to financial reasons. The rights of the trading company was then sold to Baron Von Overbeck, the Austrian Consul in Hong Kong, and he later obtained another 10-year renewal of the lease. The rights was subsequently transferred to Alfred Dent, whom in 1881 formed the British North Borneo Provisional Association Ltd. In the following year, the British North Borneo Company was formed and Kudat was made its capital. In 1883 the capital was moved to Sandakan to capitalise on its potential of producing timber. In 1888 North Borneo became a protectorate of Great Britain. Administration and control over North Borneo remained in the hands of the Company despite being a protectorate and they effectively ruled until 1942. Their rule had been generally peaceful except for some rebellions, including one led by the Bajau leader Mat Salleh from 1894 to 1900, and another led by the Muruts which is known as the 'Rundum resistance' in 1915.
Second World War and the road to independence
From 1942 to 1945 the occupation and control over North Borneo was taken over by the Japanese forces in the Second World War. The Japanese forces landed in Labuan on January 1, 1942 and assumed control over North Borneo. Bombings during the war resulted in the devastation of most towns in North Borneo, including Sandakan, which was totally destroyed. When Japan lost the war North Borneo was administered by the British Military Administration and in 1946 it become a British Crown Colony. Jesselton (now Kota Kinabalu) was chosen to replace Sandakan as the capital of British North Borneo. The Crown continued to rule North Borneo until 1963. On August 31, 1963 North Borneo attained self-government and independence from the British. On September 16, 1963, North Borneo together with Malaya, Sarawak and Singapore formed the Federation of Malaysia and from then on it became known as Sabah.
The Philippines claims the east part of Sabah as part of its territory, based upon the Sultanate of Brunei's cession of its north-east territories to the Sultanate of Sulu in 1703, because of military assistance given by the latter to the former. However, as the Philippines government itself does not currently acknowledge and recognize the sovereignty of the Sultanate of Sulu, their claim has been drastically weakened. Today quite a significant number of the population are Filipinos, but most of them are refugees who arrived in Sabah in the 70s, and the others are recent migrants seeking a better life. Some Filipino residents have assimilated into Sabahan society. At one point President Ferdinand E. Marcos ordered that all Philippine maps should include Sabah, but this may have been a mere political statement