Written accounts of the early history
of Singapore are sketchy and the names used to refer to the country are
varied.

Early Names
A Chinese account of the third century refers to Singapore as
Puluozhong, translating the Malay words Pulau Ujong, ie. "island at the
end" of the peninsula.
The Javanese Nagarakretagama1 of
1365 identified a settlement called Temasek, ie. "Water Town", on
Singapore island. A Chinese trader Wang Dayuan, who visited Singapore
around 1330 referred to this settlement as Danmaxi, in reporting that
there were also some Chinese found on the island.
The Sejarah Melayu or Malay Annals has the most colourful and vivid
account of how Singapore got its present name. As the story goes, Sang
Nila Utama (or Sri Tri Buana as he was more popularly known), ruler of
Palembang (in present day Indonesia), landed at Temasek one day while
seeking shelter from a storm. Sighting an animal he took to be a lion,
he decided to establish a settlement which he named Singapura, i.e.
"Lion City". The island became commonly known as Singapura by the end of
the 14th century.
Early History
During the 14th century, Singapore was caught in the struggles
between Siam (now Thailand) and the Java-based Majapahit Empire for
control over the Malay Peninsula.
According to the Sejarah Melayu, Singapore was defeated in one
Majapahit attack. Later, a prince of Palembang, Iskandar Shah, also
known as Parameswara, killed the local chieftain and installed himself
as the island's new ruler. But shortly after, he was driven out, either
by the Siamese or by the Javanese forces of the Majapahit Empire. He
fled north to Muar in the Malay Peninsula, where he founded the Malacca
Sultanate. Singapore remained an important part of the Malacca
Sultanate; it was the fief of the admirals (laksamanas), including the
famous Hang Tuah.
By the early 19th century2,
Singapore was under the rule of the Sultan of Johor, who was based in
the Riau-Lingga archipelago. One of his senior ministers, the Temenggong,
administered Johor and Singapura.
When the British East India Company founded their settlement in early
1819, through an agreement with Sultan Hussein Shah and the Temenggong,
Singapore had around 1,000 indigenous inhabitants, consisting of Malays
as well as the orang laut, i.e. sea nomads. These people were clustered
around the Singapore River, Kallang River, Telok Blangah, and along the
Johor Straits3. There were also some
Chinese traders and gambier planters in the interior.
Footnotes
1A Javanese epic poem by Prapanca, considered the most
important work of the literature that developed during the Majapahit
era.
2The period between the 15th and 18th century could be
filled by accounts given by Kennedy, Tregonning or Joginder Singh in the
respective "History of Malaya" books.
3C.M. Turnbull, A History of Singapore 1819-1988
(Singapore: OUP, 1989) p.5