Malaysian legal history has been determined by events spanning a period of some six hundred years. Of these, three major periods were largely responsible for shaping the current Malaysian system. The first was the founding of the Melaka Sultanate at the beginning of the 15th century; second was the spread of Islam in the indigenous culture; and finally, and perhaps the most significant in modern Malaysia, was British colonial rule which brought with it constitutional government and the common law system.
During the realm of the Sultanate, Melaka was an important trading port and the maintenance of law and order was crucial to its prosperity. The administration of justice was placed under the direct charge of the bendahara (or chief minister) who exercised both political and judicial functions. The temenggung (which is the commander of troops and police) was responsible for apprehending criminals, maintaining prisons and generally keeping the peace. The welfare of foreigners residing in the state was looked after by several shahbandars (habour masters and collectors of customs).
Little is known of the legal system in those days but it is generally accepted that the law administered then was a combination of Muslim law and the "Adat Temenggung" (patriarchal Malay customary law). The "Adat Temengung" was the law of the Sultan or the law ordained by the rulers and later adopted in the other regions of Peninsular Malaysia. It was the basis of the law as found in Malay legal digests compiled