The British temporarily possessed Dutch territories during the Napoleonic Wars; and Spanish areas in the Seven Years' War. In 1819, Stamford Raffles established Singapore as a key trading post for Britain in their rivalry with the Dutch. However, their rivalry cooled in 1824 when an Anglo-Dutch treaty demarcated their respective interests in Southeast Asia. British rule in Burma began with the first Anglo-Burmese War (1824–1826).