Temasek (also spelt Temasik) is an early recorded name of a settlement on the site of modern Singapore. The name appears in early Malay and Javanese literature, and it is also recorded in Yuan and Ming Chinese documents as Danmaxi (Chinese: 單馬錫; pinyin: Dānmǎxī; Pe̍h-ōe-jī: Tan-má-sek or Chinese: 淡馬錫; pinyin: Dànmǎxī; Pe̍h-ōe-jī: Tām-má-sek). Two distinct settlements were recorded in Temasek – Long Ya Men (Malay: Batu Berlayar) and Ban Zu (Malay: Pancur).  The name is used in modern-day Singapore for national honours as well as institutions and corporations.
 The origin of the name Temasek is uncertain, but it has been proposed that it was derived from the Malay word tasik meaning "lake" or "sea", and may mean here "place surrounded by the sea", or Sea Town.  Another suggestion is that it may be a reference to a king of Srivijaya, Maharaja Tan ma sa na ho. The name appears as Tumasik in the Old Javanese eulogy written in 1365, Nagarakretagama, which basically the word tasik "sea" infixed by -um- (active verb infix). The name is also mentioned twice in the Malay Annals, and referred to in the Javanese work Pararaton. Temasek is described in the account by the Chinese traveller Wang Dayuan who visited the island around 1330 and wrote about a Malay settlement called Danmaxi, a transcription of the name Temasek.  In a version of Marco Polo's account of his travel, a place named Chiamassie that could be Temasik was mentioned in relation to the island kingdom of Malayur. Temasek may have also been mentioned in Vietnamese records as Sach Ma Tich in the 14th century.
 Some time in the 14th century, the name Temasek was replaced by Singapura, a Malay name derived from Sanskrit meaning "Lion City". Legend has it that the name was given by Sang Nila Utama when he visited the island in 1299 and saw an unknown creature, which he was informed was a lion. Although Chinese records continued to use the name Temasek for some time afterwards (for example in the Mao Kun map) and it was also used in The Malay Annals, the name Temasek had become obsolete and did not appear in European maps and documents from 1500 to 1800. It was revived in colonial and more modern times, and is now used as names for institutions, corporations and national honours in Singapore.
 While the early history of Singapore is obscured by myth and legend, some conclusions can be drawn from archaeological evidence and from written references by travellers. Archaeology points to an urbanised settlement on the site by the 14th century. At its height, the city boasted a large earthen city wall and moat; many of the buildings were built with stone and brick foundations. Remains of old pottery, coins, jewellery and other artefacts have been found, with many of these artefacts believed to be imported from various parts of China, India, Sri Lanka, and Indonesia. These are sometimes seen as evidence of the city's status as a regional trade centre. An aquatic route, part of the larger Silk route, passed through Temasek.
 From the 7th to the 11th centuries, the island of Singapore was controlled by the Srivijaya empire based in Sumatra.  Diplomatic relationships between Temasek and Vietnam may have begun in the 13th century. Temasek was a fortified city and trading centre in the 14th century. It was recorded that during the Yuan dynasty, envoys were sent to Long Ya Men (Dragon's Teeth Gate, thought to be the entrance of Keppel Harbour) in 1320 to obtain tame elephants. The people of Long Ya Men then returned in 1325 with a tribute and trade mission to China. In around 1330, the Chinese traveller Wang Dayuan visited the island and mentioned two distinct settlements in Temasek: Long Ya Men and Ban Zu (a transcription of the Malay name pancur meaning a "spring"). In his work Daoyi Zhilüe, Wang described Long Ya Men as the two hills of Temasek that looked like "Dragon's teeth" between which a strait runs, and wrote:
 The fields are barren and there is little padi  ...  In ancient times, when digging in the ground, a chief came upon a jewelled head-dress.  The beginning of the year is calculated from the [first] rising of the moon, when the chief put on this head-gear and wore his [ceremonial] dress to receive the congratulations [of the people]. Nowadays this custom is still continued.  The natives and Chinese dwell side by side.  Most [of the natives] gather their hair into a chignon, and wear short cotton bajus girded about with black cotton sarongs. Wang further mentioned that lakawood and tin were products there and the natives traded with Chinese from Quanzhou, but Chinese junks on their way back from the Western Oceans (西洋) may be met by pirates there who attacked with two to three hundred perahus (boats).  The description of the people may be the first known record of the Orang Laut who inhabited the region.
 Ban Zu was described as being sited on a hill, thought to be today's Fort Canning Hill, located behind Long Ya Men.  In contrast to those of Long Ya Men who were prone to acts of piracy, the inhabitants here were described as honest.  They also "wear their hair short, with turban of gold-brocaded satin", and red-coloured clothing. Ruins of the settlement on the hill were still visible in the early 19th century and was described by the Resident John Crawfurd.  In 1928, several pieces of gold ornaments dating to the mid-14th century were discovered at Fort Canning Hill. Wang also reported that the Siamese attacked the city moat of Temasek with around 70 ships a few years before he visited, and the city successfully resisted the attack for a month.
 By the 14th century, the Srivijaya empire had declined, and the Majapahit and Ayutthaya Kingdom became dominant in the region and alternatively made claim to Temasek. The Nagarakretagama written in 1365 listed Tumasik as a vassal of the Majapahit. Portuguese sources indicate that during the late 14th century, Temasek was a Siamese vassal whose ruler was killed by Parameswara from Palembang. Parameswara was driven from Palembang by the Javanese after Parameswara challenged the Majapahit by setting up a lion throne that symbolised a revival of Palembang's claim over the Srivijaya empire. According to a Portuguese account, Parameswara fled to Temasek, and eight days later killed the local chief with the title Sang Aji, named Sangesinga in a later account. It has been proposed that Temasek changed its name to "Singapura" in this period rather than in 1299 as suggested by the legend of Sang Nila Utama given in the Malay Annals.
 Portuguese sources indicate that Parameswara ruled Singapura for five years, he was then attacked by either the Majapahit or the Siamese, forcing him to move on to Melaka where he founded the Sultanate of Malacca. Singapura came under the influence of the Malacca in the 15th century and, after the fall of Malacca to the Portuguese, the control of the Malay Sultanate of Johor in the 16th century.  A settlement there was finally burnt to the ground by the Portuguese in 1613 and the island sank into obscurity for two hundred years until the early 19th century with the arrival of Sir Stamford Raffles.
 The Republic's two most important national honours are titled Bintang Temasek (The Star of Temasek for acts of exceptional courage and skill or exhibiting conspicuous devotion to duty in circumstances of extreme danger) and the Darjah Utama Temasek (Order of Temasek, for outstanding and exceptional contributions to the country).
 Other institutions that bear the name: