Abdul Ghafur Muhiuddin Shah of Pahang

Sultan Abdul Ghafur Muhiuddin Shah ibni Almarhum Sultan Abdul Kadir Alauddin Shah was the 12th Sultan of Pahang who reigned from 1592 to 1614. He was originally appointed as regent for his younger half-brother of a royal mother, Ahmad Shah II after the death of their father in 1590. He subsequently deposed his charge and assumed power two years later.
He is credited for during his reign, the "Hukum Kanun Pahang" ('Pahang Laws') was compiled and became the base for the legal administration not only in Pahang, but later in Johor. 
Personal life.
Born as Raja Abdul Ghafur in 1567, he was the eldest son of the 10th Sultan of Pahang, Abdul Kadir Alauddin Shah by a junior wife. The other of his half siblings were Raja Yamir, Raja Ahmad, Puteri Kamaliah, and Puteri Khairul Bariah. Following the invasion of Pahang by Aceh Sultanate later in 1617, several members of Pahang royal family were brought to Aceh. Puteri Kamaliah became the queen consort to the ruler of Aceh, Iskandar Muda, while her sister Khairul Bariah was married to the future first Sultan of Deli, Gocah Pahlawan.
In 1584, Abdul Ghafur had married Princess Ungu, the youngest sister of Raja Hijau of Pattani. From this marriage, he had issued a daughter, Raja Kuning. Both Raja Ungu and Raja Kuning were successively ruled Pattani from the period of 1624 to 1651, after the era of Raja Hijau and Raja Biru. Abdul Ghafur also formed marriage connection with Brunei, when he married Princess Zaharah or Zohra, daughter of Saiful Rijal. He had issued a prince from this marriage, named Abdullah, whom he designated an heir or "Raja Muda". Abdul Ghafur also had another son with an unknown wife, whose name was not disclosed in local history but found inscribed on a royal seal in a treaty with Portuguese Malacca. He was identified as Alauddin Riayat Shah who believed to have ascended the throne after killing father and elder brother Raja Muda Abdullah in 1614. Abdul Ghafur was also survived by other 12 children from his commoner wives.
Reign.
Following the demise of their father, the 10th Sultan of Pahang, Abdul Kadir Alauddin Shah, Abdul Ghafur was appointed regent for his younger half-brother of a royal mother, Ahmad Shah II who succeeded as the 11th Sultan of Pahang in 1590. He subsequently deposed his charge and assumed power two years later.
Foreign relations.
Abdul Ghafur discontinued the policy of cordial relationship with the Portuguese as enjoyed during his father's era. During his reign, Pahang attacked the Portuguese and simultaneously challenged the Dutch presence in the Straits of Malacca. Nevertheless, in 1607, Pahang not only tolerated the Dutch, but even cooperated with them in an attempt to oust the Portuguese.
In 1607, the Dutch Empire began their trade mission to Pahang lead by the merchant Abraham van den Broeck. On 7 November 1607, a Dutch warship with Admiral Cornelis Matelief de Jonge onboard dropped anchor at Kuala Pahang. Earlier in 1606, Matelief, in an attempt to establish the Dutch power in the Straits of Malacca, was defeated twice by the Portuguese in the First Siege of Malacca and the Battle of Cape Rachado. Matelief, who had come to solicit the assistance of Pahang against the Portuguese, had an audience with the Sultan. The ruler emphasized the importance of alliance between Johor and neighbouring states, and added that he would try to provide two thousand men in order to bring the war to a successful conclusion. At the Sultan's request, Matelief sent him a gunner to test a piece of cannon that was being cast for Raja Bongsu of Johor. The Pahang people also manufactured cannon for firing projectiles which were better than those of Java but inferior to those of the Portuguese.
Matelief requested the Sultan to send two vessels to the Straits of Sabon to join the Johor vessels which were already there, and to despatch two more vessels to Penang waters to strengthen the Kedah and Achinese fleets to cut the Portuguese food supplies. Abdul Ghafur tried to reforge the Johor-Pahang alliance to assist the Dutch. However, a quarrel which erupted with Johor, resulted in an open war between the two states. In September 1612, the Johor army overran and plundered Pekan in a surprise attack. The people of Pahang were taken unprepared and retreated without fighting, with the sultan and his son in law, a prince from Brunei, retreated to the mountains. Abdul Ghafur reclaimed the state only in 1613 after having defeated Johor with the aid of Sultan of Brunei.
Administration.
Pahang was governed by the set of laws that derived from the formal legal text of Melaka consisted of the "Undang-Undang Melaka" and the "Undang-Undang Laut Melaka". The laws as written in the legal digests went through an evolutionary process. By the early 17th century, during the reign of Sultan Abdul Ghafur, Pahang promulgated the set of laws into its own version, called "Hukum Kanun Pahang", that contain among others, detailed provisions on ceremonial matters, settlement of social conflicts, maritime matters, Islamic laws and general matters.
By the time of Sultan Abdul Ghafur, a sophisticated social hierarchy was established in Pahang, of which the most important were the offices of four major hereditary chiefs who were granted their respective fiefs to govern on behalf of the Sultan. A tradition
handed down in the family of the Menteri of the Lipis valley,
(minor head-men of the Orang Kaya Setia Wangsa of Lipis),
records that the progenitor of Orang Kaya Indera Perba Jelai first came to Jelai, and was granted the fief by the Sultan, about 1000 A.H. (1591 A.D.).
Death.
Abdul Ghafur died in 1614, together with his eldest son Raja Muda Abdullah, possibly poisoned by his second son who succeeded as Alauddin Riayat Shah. He was posthumously known as "Marhum Pahang" and buried alongside his son who was posthumously known as "Marhum Muda Pahang", at Chondong Royal cemetery, Pekan. The tombstones at Chondong Royal cemetery were erected later in 1638 by the order of his nephew, Iskandar Thani, who ruled Aceh from 1636 to 1641.
Before 1607, Raja Muda Abdullah had married a Perak princess by whom he had two daughters. When Raja Muda Abdullah was murdered in 1614, his widow and daughters were sent to Perak. There, she and her daughters were captured by Iskandar Muda and taken to Aceh, where in time, one of the daughters was married to another royal captive, Raja Sulong, the future Sultan Muzaffar Riayat Shah II of Perak.
In popular culture.
Raja Abdul Ghafur was played by Jesdaporn Pholdee in the 2008 Thai movie "Queens of Langkasuka". He was depicted in the movie as the fiancé of Princess Ungu who came to defend Pattani during the reign of Raja Hijau.