Caning is used as a form of legal corporal punishment in Malaysia. It can be divided into at least three contexts: judicial/prison, school, and Sharia ("Syariah"). Of these three, the first two are largely a legacy of, and are influenced by, British colonial rule in the territories that are now part of Malaysia, particularly Malaya. Similar forms of corporal punishment are also used in some other former British colonies, including two of Malaysia's neighbouring countries, Singapore and Brunei.