In the absence of an indigenous written tradition, oral literature thrived and continues to survive among the indigenous peoples of Malaysia: the Malays, Orang Asli and numerous Sarawak and Sabah groups. The oral tradition encompasses a wide range of genres from folk tales to legends, romances to epics, and poetry to proverbs. The Malay oral tradition was influenced by early Indian epics such as the Mahabharata and the Ramayana. Originally confined to the Sanskritic tradition, this Hindu influence later included other traditions, such as those of southern India including the Hikayat Mara Karma, Hikayat Pancatenderan and Hikayat Gul Bakawali, which became part of the Malay literary heritage. The Panji cycle from Hindu Java was another source for Malay romantic tales. Malay poetry too, was—and remains—highly developed with a large number of forms. Some of these are still popular, and use of the pantun in particular has even spread to other languages.
The Chinese and Indian communities who later emigrated to what is now Malaysia brought with them long-established written traditions from their homelands, but only began to write locally produced works in the 19th century (see 'Modern Literature'). Among the Malays, the written tradition commenced with the advent of Islam in the Peninsula—at the latest by the 15th century—and the adoption of the Arabic-based Jawi script. This tradition was influenced not only by the pre-existing indigenous oral tradition, but also by newer sources from the Muslim world. Works produced ranged from theological literature and works on governance and legal digests, to romances, moral anecdotes, popular tales of the Islamic prophets, and animal tales, and were written in a variety of styles from the religiously scholarly to the popular Hikayat form.
The Malay sultanates produced their own literary tradition, as scribes were employed to record the significant events of the time. These histories were later copied and recopied, with subsequent scribes both adding to and subtracting from the original texts. The celebrated Sulalatus al-Salatin, popularly known as the Sejarah Melayu (The Malay Annals), may have had a core recorded during the Melaka period (1401–1511), but it is said to have been rewritten in 1536 and revised in 1612. Elements of this work were used and expanded upon in the landmark Hikayat Hang Tuah. Both of these works have been nominated as world heritage items under the United Nations Educational, Scientific and Cultural Organization (UNESCO) 'Memory of the World' programme.