Moslem merchants from Gujarat and Persia began visiting Indonesia in the 13th Century and established trade links between this country and India and Persia. Along with trade, they propagated Islam among the Indonesians people, particularly along the coastal areas of Java, like Demak.
At a later stage they even influenced and converted Hindu kings to Islam, the first being the Sultan of Demak. This Moslem Sultan later spread Islam westwards to Cirebon and Banten, and eastward along the northern coast of Java to the kingdom of Gresik. In the end, he brought the downfall of the powerful kingdom of Majapahit (1293-1520).
After the fall of Majapahit, Islam spread further east to where the sultanates of Bone and Goa in Sulawesi were established. Also under the influence of Islam, were the sultanates of Ternate and Tidore in the Maluku. North of Java, the religion spread to Banjarmasin in Borneo and further west to Sumatra, where Palembang, Minangkabau (West Sumatra), Pasai and Periak were converted.
Meanwhile, descendants of the Majapahit aristocracy, religious scholars and Hindu Ksatriyas retreated through the East Java peninsula of Blambangan to the island of Bali and Lombok. In a later period, however, the eastern part of Lombok was converted to Islam, which entered the island from the southern Sulawesi city of Makassar, now named Ujungpandang.
The capital of the West Java Kingdom of Pajajaran was Sunda Kelapa (1300 AD). It was located in the present capital city of Indonesia, Jakarta. In 1527 Sunda Kelapa was conquered by Falatehan, and Islamic troop commander of the sultanate of Demak.
After his conquest the city was renamed Jaya Karta, meaning “the great city,” this was the origin of the present name, Jakarta. Falatehan also defeated the Portuguese, who had also tried to seize the city.