By the early 1900s, Britain was in control of present-day Malaysia and Singapore, which were occupied by Japan during World War II. After the war, the Federation of Malaya was formed in 1948 under British authority, but became independent in 1957. In 1963 the Federation of Malaysia was formed with Singapore, Sarawak and Sabah joining the federation. In August 1965, Singapore seceded from Malaysia because of its friction with the central government, and Singapore became an independent country. Under Mahathir Mohamad, Malaysia’s Prime Minister between 1981 and 2003, the country was successful in diversifying its economy from dependence on exports of raw materials to expansion in manufacturing, services, and tourism. Malaysia today boasts one of Southeast Asia's most vibrant economies as a result of decades of rapid industrialization and political stability.