Abdul Ghafur Muhiuddin Shah of Pahang

Sultan Abdul Ghafur Muhiuddin Shah ibni Almarhum Sultan Abdul Kadir Alauddin Shah was the 12th Sultan of Pahang reigning 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, Sultan Abdul Kadir Alauddin Shah in 1590. Two years later he deposed his half-brother and assumed power.

He is credited for the establishment of the Hukum Kanun Pahang (Pahang Laws) which was compiled and became the basis for the legal administration for Pahang, and later 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. His other half-siblings were Raja Yamir, Raja Ahmad, Puteri Kamaliah, and Puteri Khairul Bariah. Following the invasion of Pahang by the Aceh Sultanate in 1617, several members of Pahangese 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 a daughter, Raja Kuning. Both Raja Ungu and Raja Kuning successively ruled Pattani from 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 Sultan Saiful Rijal. He had a son 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 was found inscribed on a royal seal in a treaty with Portuguese Malacca. He was identified as Alauddin Riayat Shah who believed to have ascended to the throne after killing his father and elder brother Raja Muda Abdullah in 1614. Abdul Ghafur was also survived by 12 other children from his commoner wives.

Reign
Following the death of their father, the 10th Sultan of Pahang, Abdul Kadir Alauddin Shah, Abdul Ghafur was appointed regent to his younger half-brother of a royal mother, Ahmad Shah II who succeeded their father as the 11th Sultan of Pahang in 1590. Two years later he deposed his half-brother and assumed power.

Foreign relations
Abdul Ghafur discontinued Pahang's cordial relationship with the Portuguese that had existed during his father's reign. During his reign, Pahang attacked the Portuguese and simultaneously challenged the Dutch presence in the Strait 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 began their trade mission to Pahang led 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 Dutch power in the Strait 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 Pahangese also manufactured cannons 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 Johorean vessels which were already there, and to despatch two more vessels to Pahangese waters to strengthen the Kedahan 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 erupted with Johor, which resulted in an open war between the two states. In September 1612, the Johorean 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, retreating to the mountains. Abdul Ghafur reclaimed the state in 1613 after having defeated Johor with the aid of the Sultan of Brunei.

Administration
Pahang was governed by the set of laws that derived from the formal legal text of Malacca consisting 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 other things, detailed provisions on ceremonial matters, settlement of social conflicts, maritime matters, Islamic laws and general matters.

Death
Abdul Ghafur died in 1614, together with his eldest son Raja Muda Abdullah, possibly poisoned by his second son who succeeded him as Sultan 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 Perakian 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.