Kalinyamat Sultanate

Kalinyamat Sultanate, Kalinyamat Kingdom or Jepara Kingdom, was a 16th-century Javanese Islamic polity in the northern part of the island of Java, centred in modern-day Jepara, Central Java, Indonesia.
Both Jepara and Kalinyamat was first established as a Duchy settlements under Demak Sultanate. After succession feud, Kalinyamat was declared as a separate polity from Demak. Traditional accounts provide the names of several of its leaders; Sultan Hadlirin, and his wife and also successor, Retna Kencana (Ratu Kalinyamat) (r. 1549–1579).
History.
Formation.
The settlements in Kalinyamat and the port of Jepara was established as a "kadipaten" or duchy under Demak Sultanate. The daughter of Sultan Trenggana of Demak, Retna Kencana and her husband, Sultan Hadlirin, was appointed as the duke and duchess of Kalinyamat by Demak Sultan.
After the death of Trenggana, the throne was succeeded to his son Sunan Prawata. In 1549, Arya Penangsang, the duke of Jipang Panolan ascend to the throne of Demak after assassinating his cousin Sunan Prawata. Prawata younger sister Ratna Kencana, sought justice to Sunan Kudus, the teacher of Penangsang. Sunan Kudus however, declined her request since previously Prawata has committed the crime by assassinate Penangsang's father, Raden Kikin (Sekar Seda ing Lepen), thus rendered Penangsang's revenge justified. Disappointed, Ratna Kencana went home with her husband, Sultan Hadlirin, from Kudus to Kalinyamat only to be attacked by Penangsang's men on their way. Hadlirin was killed in this attack while Ratu Kalinyamat barely survived.
After the succession feud that led to the assassination of Sunan Prawata of Demak by Arya Penangsang, Queen Kalinyamat declared her domain, Kalinyamat, Jepara, and other parts as a separate kingdom from Demak. Ratu Kalinyamat sought revenge on Penangsang, since he also murdered her husband, Sultan Hadlirin. She urged her brother in-law, Hadiwijaya (popularly known as Jaka Tingkir), the Duke of Pajang (Boyolali), to kill Arya Penangsang.
Encounters with the Portuguese.
First campaign against the Portuguese in Malacca.
In 1550, Queen Regent of Jepara, Kalinyamat, alarmed at the growth of Portuguese power in the region, sent 4,000 soldiers in 40 ships to meet sultan Johor's request to free Malacca of the dreaded Europeans. Jepara troops were later joined forces with Malay Guild with combined up to 200 warships. The combined forces attacked from the north to capture most of Malacca. However, the Portuguese, in retaliation, pushed back the invading forces. Malay Guild troops were repelled, while the Jepara troops remained on shore. While trying to evacuate the shores, the Jepara troops were ambushed by the Portuguese, thus suffering an estimated 2,000 casualties. The storm came crashing and stranded two Jepara vessels back to Malacca shore, and they fell prey to the Portuguese. Jepara soldiers who made it back to Java were not more than a half of those managed to leave Malacca.
Second campaign against the Portuguese in Malacca.
In 1564, Ali Riayat Syah of Aceh asked for Demak's help to attack the Portuguese in Malacca. At that time the ruler of Demak was Arya Pangiri, the son of Sunan Prawata. The easily suspecting Pangiri killed the Acehnese envoy instead. Disappointed, Aceh still went on with their plan and attacked Malacca in 1567 without the help of Java. The attack however was ended in failure.
In 1568, Jepara again attacked the Strait of Malacca, combined with the forces of the Aceh Sultanate led by Alauddin al-Kahar. The combined forces met success in plundering the goods of the Portuguese, though it was short-lived. After being beaten back by the Portuguese, the coalition forces retreated.
In 1573, the Sultan of Aceh asked for Queen Kalinyamat's help to attack Malacca once again. The Queen sent 300 ships containing 15,000 Jeparan soldiers. The Javanese forces was led by the Admiral Ki Demat and just arrived in Malacca in October 1574. Yet when they arrived, the Aceh troops has been beaten back by the Portuguese.
Jepara vessels opened fire directly to the fort of Malacca from the strait. The next day they landed and built some defences on the shore. But eventually, the Jeparan defence was being penetrated by the Portuguese that set fires to around 30 Jeparan ships. Jeparan was shaked, but still refused the peace talks. Meanwhile, six supplies ships delivered by Queen Kalinyamat was captured by the Portuguese. The lack of logistics has weakened the Jeparan troops and finally they decided to retreat. From the original numbers of troops sent by Queen Kalinyamat, only about a third of them survived to return to Java.
Despite being beaten several times, the Portuguese had great respect for Queen Kalinyamat, dubbing her "Rainha de Japara, Senhora poderosa e rica, de kranige Dame," meaning "Queen of Jepara, a rich and powerful woman, a brave woman".
Third campaign against the Portuguese in Moluccas.
Queen Kalinyamat never was deterred. In 1565 she met the demand of people in Ambon (Moluccas) Hitu to face the disruption of the Portuguese and the Hative.
Decline.
After Ratu Kalinyamat's death, the kingdom entered a period of decline and later was annexed by the Mataram Sultanate.