Demak is a region given by Brawijaya, notably in Glagah Wangi. This region evolved abd formed a strong power. Sunan or Saints favored the development of Demak Bintoro. raden patah or Jin Bun was the son of Brawijaya, Majapahit king. Demak was a harbor city in Java so it flourished to be a trade city and the center of Islam in Java. Demak used this opportunity to release from Majapahit. After Majapahit fell, Demak became Islam kingdom led by Raden Patah or Sultan Alam Akbar Al-Fatah, or Senopati Jimbun Ngabdurrahman Panembahan palembang Sayidin Panatagama. As suggested by Sunan Ampel, he became kign od Demak. Sunan Ampel was the teacher of Raden Patah one of prominent member of Walisongo.
Demak attacked Majapahit was initiated by the puwer of Majapahit under Girindrawardhana who had no right of the throne. Raden Patah had the right more than him as he was the son of Brawijaya. Raden Patah gathered power and attacked Majapahit and ruled over Majapahit. But in 1478, Majapahit was not burned down and destroyed. Demak kingdom was free and independence. Majapahit became a subordinate region of Demak and evolved. Economically, Demak was a maritime kingdom. Demak location was strategic that made Demak flourished quickly. Demak location was on coastal and it has fertile farms with lush teak forest.
Since 1509, Adipati Unus, son of Raden Patah was prepared to attack Malaka. But in 1511 Portugese did that earlier. Still, Adipati Unus did not cancel his will, and in 1512 Demak sent fleet to Malaka. Landed at Malaka coast, the fleet was attacked by Portuguese cannon favored by Sultan Mahmud son in law, Sultan Abdullah, king from Kampar. The second assault was in 1521 by Pangeran Sabrang Lor or Adipati Unus but it failed again.
In 1521 Adipati Unus died suddenly, and caused Demak falter for who would be the predecessor of Raden patah if Adipati Unus died. According to serat Kanda, Raden Patah had 4 sons. Adipati Unus and Trenggana were his children with his second wife, Kanduruhan was from his second wife and from third wife was Kikin. Raden Kanduruhan was older than Trenggana that triggered brothers war. Seeing this situation, Girindrawardhana gave opportunity to Majapahit to be the authority. But Sultan Trenggana sent Sunan Gunung Jati to attack Majapahit in 1527. Girindrawardhana dies and there was no more Majapahit and varnished in the end.
Demak Civil war was initially caused by the seath of the oldest son of Raden patah, Adipati Unus, the royal prince. The throne became bone of contention among Raden Patah’s sons. The rivalry was very fierce between Sultan Trenggana and Pangeran Seda Lepen (Kikin). Finally, Demak was led by Trenggana and ordered his son Prawoto to kill Seda Lepen. In Sultan Trenggana’s period (152101546), Demak was in its glorious day and they overtook West Java and East Java. Demak built fortress on the western region, in Cirebon. Sultan Cirebon later detached his kingdom from Demak and became Pajang sultanate.
Sultan Trenggana had two sons and four daughters. The first daughter married to Pangeran Langgar, the second was son, Sunan Prawoto, the third child was a daughter married to Kalinyamat, the fourth child was a daughter married to prince from Cirebon, and the fifth child was a daughter married to Jaka Tingkir and the last son was Pangeran Timur.
Aryo Penangsang was instigated to take revenge for his father death Raden Kikin or Pangeran Sedo Lepen. Arya Penangsang killed Sunan Parwoto, overtook Demak throne. IN 1546 after the death of Sultan Trenggana died in sudden, his son Sunan Prawoto went to throne and became the third king of Demak. Arya Penangsang then order his men to attack Demak when Demak fleet was not there, as the fleet was sent to eastern of Indonesia. With least effort, Arya Penangsang burned Demak down and only left mosque and chinese temple. Demak troop that was lost then escaped to Semarang, still Arya Penangsang men after them. Sunan Prawoto died in battle, but his death did not end the conflict. As later, Jaka Tingkir moved Demak to Pajang. Jaka Tingkir was the son of Ki Ageng Pengging, regent of Majapahit, located in Surakarta.
In babad tanah jawi or java chronicle, Arya Penangsang killed Sunan Prawoto and Pangeran Kalinyamat, and only Jaka Tingkir left alive. Kalinyamat death made widow of Kalinyamat to make contest that whoever could kill Arya Penangsang would be awarded with her wealth and became her husband. Jaka Tingkir assisted by Ki Ageng Panjawi and Ki Ageng Pemanahan could kill Arya Penangsang. Ki Ageng Panjawi was awarded with Pati region and Ki Ageng Pemanahan was awarded with Mataram region.
Jin Bun dynasty ended in 1546, only for 68 years. And later Pajang sultanate established on the west of current Surakarta city. The civil war ended Demak sultanate in Java. Jaka Tingkir moved Demak to Pajang.