Present-day Singapore was founded in 1819 by Stamford Raffles as a trading post of the British Empire. During the Second World War, Singapore was taken over by Japan in 1942, but returned to British control after Japan surrendered in 1945. Singapore started to govern itself in 1959, and in 1963 became part of the new federation of Malaysia, together with Malaya, North Borneo, and Sarawak. Political and social differences led to Singapore being removed from the federation two years later, becoming an independent country on its own.