At the end of the eighteenth century, Dutch control in Southeast Asia was more widespread than ever, but the VOC's coffers were empty and it faced the superior trading and maritime skills of the
British
. High taxes in Melaka were forcing traders to more economical locations such as the newly established British port of Penang, whose foundation in 1786 heralded the awakening of British interest in the Straits.
When the British East India Company (EIC) moved in on Melaka and the rest of the Dutch Asian domain in 1795, the VOC barely demurred. The British soon founded Singapore as their own regional entrepôt, signing an agreement with the Sultanate of Riau-Johor in 1819. The strategic position and free-trade policy of Singapore instantly threatened the viability of both Melaka and Penang, forcing the Dutch finally to relinquish their hold on the former to the British, and leaving the latter to decline.
The
Anglo-Dutch Treaty
of 1824, which divided territories between the two countries using the Straits of Melaka as the dividing line, split the Riau-Johor kingdom. This was followed in 1826 by the unification of Melaka, Penang and Singapore into one administration, known as the Straits Settlements, with Singapore replacing Penang as its capital in 1832.
The Anglo-Dutch Treaty did not include Borneo, however, and though the EIC discouraged official expansion, British explorer James Brooke (1803-68) managed to persuade the Sultan of Brunei to award him his own area - Sarawak - in 1841, becoming the first of a line of "White Rajahs" that ruled the state until the start of World War II