Under the Malay aristocracy, the city was known Seludong/Selurung, which was the same name given for the general region of southwestern Luzon at that time, suggesting that it was the capital of Ancient Tondo.It was also, known as Gintu ("The Land/Island of Gold") or Suvarnadvipa by its neighbors. The said kingdom flourished during the latter half of the Ming Dynasty as a result of trade relations with China. Ancient Tondo has always been the traditional capital of the empire. Its rulers were equivalents to kings and not mere chieftains, and they were addressed as panginuan or panginoon ("lords"), anak banwa ("son of heaven") or lakandula ("lord of the palace"). Well into the 13th century, the city consisted of a fortified settlement and trading quarter at the bay of the Pasig River, on top of previous older towns.
During the reign of Bolkiah (1485-1521) the Sultanate of Brunei decided to break the Kingdom of Tondo's monopoly in the China trade by attacking Tondo and establishing the city state of Selurong (now Manila) as a Burneian satellite. A new dynasty under the Salalila was also established to challenge the House of Lakandula in Tondo. Another kingdom, named Namayan, was established as a confederation of barangays that began to peak in 1175 and extended from Manila Bay to Laguna de Bay. The royal capital of the kingdom was built in Sapa, known today as Sta. Ana.
In the mid-16th century, the areas of present-day Manila were part of larger thalassocracies governed by Muslim Rajahs. Rajah Sulayman and Rajah Matanda ruled the Muslim communities south of the Pasig River, and Rajah Lakandula ruled the Kingdom of Tondo, the Hindu-Buddhist community north of the river. The two Muslim communities of Sulayman and Matanda were unified into the Kingdom of Maynila. Both city-states were officially Malay-speaking and held diplomatic ties with the Bolkiah dynasty of Brunei, and the sultanates of Sulu, and Ternate.
Source: Wikipedia Encyclopedia