Malacca Sultanate
Early foundation

The founding of Malacca is generally taken to be c. 1400. The region was dominated by the Srivijaya empire centered on Palembang in Sumatra until it was weakened by the Chola Empire in the 11th century. By the end of the 13th century, the Javanese Singhasari followed by the Majapahit had become dominant.

According to the Malay Annals, a prince from Palembang named Seri Teri Buana who claimed to be a descendant of Alexander the Great and Rajendra Chola I, stayed on Bintan Island for several years before he set sail and landed on Temasek in 1299. The Orang Laut, known for their loyal services to Srivijaya, eventually made him king of a new kingdom called Singapura. In the 14th century, Singapura developed concurrently with the Pax Mongolica era and rose from a small trading outpost into a centre of international trade with strong ties to the Yuan dynasty.

In an effort to revive the fortune of Malayu in Sumatra, in the 1370s, a Malay ruler of Palembang sent an envoy to the court of the first emperor of the newly established Ming dynasty. He invited China to resume the tributary system, just like Srivijaya did centuries earlier. Learning of this diplomatic maneuver, King Hayam Wuruk of Majapahit sent an envoy to Nanking and convinced the emperor that Malayu was their vassal, and not an independent country. Subsequently, in 1377—a few years after the death of Gajah Mada, Majapahit sent a punitive naval attack against a rebellion in Palembang, which caused the diaspora of the Palembang princes and nobles.

By the second half of the 14th century, the Kingdom of Singapura grew wealthy. However, its success alarmed two regional powers at that time, Ayutthaya to the north and Majapahit to the south. As a result, the kingdom's fortified capital was attacked by at least two major foreign invasions before it was finally sacked by either Ayutthaya or Majapahit in 1398. The last king of Singapura then fled to the west coast of the Malay Peninsula.

Malay and Portuguese sources give different accounts of the fall of Singapura and its last king. In Portuguese sources, he is referred to as Parameswara and originated in Palembang but usurped the throne of Singapura, but in Malay sources he is Iskandar Shah, a descendant Seri Teri Buana who became the fifth king of Singapura. Parameswara fled north to Muar, Ujong Tanah and Biawak Busuk before reaching a fishing village at the mouth of Bertam River (modern-day Malacca River). The village belonged to the Orang Laut who were left alone by Majapahit's forces that not only sacked Singapura but also Langkasuka and Pasai. As a result, the village became a safe haven and in the 1370s it began to receive a growing number of refugees fleeing Majapahit's attacks. By the time Parameswara reached Malacca in the early 1400s, the place was already cosmopolitan feel with Buddhists from the north, Hindus from Palembang and Muslims from Pasai.

Legend has it that Parameswara saw a mouse deer outwit his hunting dog into the water when he was resting under the Malacca tree. He thought this bode well, stating, "this place is excellent, even the mouse deer is formidable; it is best that we establish a kingdom here". Tradition holds that he named the settlement after the tree he was leaning against while witnessing the portentous event. Today, the mouse deer is part of modern Malacca's coat of arms. The name "Malacca" itself was derived from the fruit-bearing Melaka tree (Malay: Pokok Melaka) scientifically termed as Phyllanthus emblica. Another theory to the origin of Malacca's name is that it originated from Arab merchants, during the reign of Sultan Muhammad Shah (r. 1424–1444), who called the kingdom "Malakat" (Arabic for "congregation of merchants") because it was home to many trading communities.
change_case:english_capital, startend:end_checker