Malaysia was formed in 1963 when the former British colonies of Singapore and the East Malaysian states of Sabah and Sarawak on the northern coast of Borneo joined the Federation .