Muhammad Shah of Pahang

Sultan Muhammad Shah ibni Almarhum Sultan Mansur Shah (1455–1475) was the founder of the old Pahang Sultanate and reigned from 1470 to 1475. A former heir apparent to the Malaccan throne, he was banished by his father Mansur Shah for committing murder, following an incident in a Sepak Raga game and went into exile in Pahang and was later installed as its first sultan in 1470.

Personal life
Sultan Muhammad was known as Raja Muhammad before his accession, He was the second of two sons of the sixth Sultan of Malacca, Mansur Shah by his wife Putri Wanang Sri Lela Wangsa, daughter of Dewa Sura, the last Pre-Malaccan ruler of Pahang, who was also a relative of the King of Ligor. Both his mother and grandfather were captured and presented to the Sultan of Malaccan after the conquest of Pahang in 1454.

When he was young Raja Muhammad had been favoured by his father, as his successor over his elder brother, Raja Ahmad and was named Raja Muda ('heir apparent'). Raja Muhammad, had earned a reputation of being a hot-tempered youth. This ultimately brought about his own exile from Malacca after murdering Tun Besar, a son of Bendahara, Tun Perak.

Sultan Muhammad was married to a Kelantanese princess named Mengindera Puteri, the granddaughter of Sultan Iskandar Shah of Kelantan (r. 1429–1467). From the marriage he had issued three sons; Raja Ahmad, Raja Abdul Jamil, and Raja Mahmud.

The Sepak Raga incident
When Raja Muhammad was about fifteen years old he was riding past a group of boys who were engaged in a sepak raga game, when a misdirected ball kicked by Tun Besar – the Bendahara Tun Perak's son – displaced Muhammad's headdress. In a rage he drew his kris and killed Tun Besar.

The Bendahara's people who were nearby flew to arms to avenge Tun Besar's death, but were restrained by the Bendahara who warned them against any measures that might be construed as treason against the Sultan reminding them that Hamba Melayu tidak pernah derhaka ('Malay folks will never commit any act of treason'). However, the Bendahara and his people vowed that the Raja Muhammad should never rule over them. Sultan Mansur, after hearing their complaint, agreed that Raja Muhammad should be exiled from Malacca. He recalled Sri Bija Diraja from Pahang and commanded him to escort Muhammad to Pahang and install him as their Sultan.

Reign in Pahang
Raja Muhammad brought with him the trappings of the Malaccan court to Pahang. He had with him Tun Hamzah, the former governor of Pahang as his first Bendahara, Seri Akar Raja as his chief Hulubalang, a Penghulu Bendahari ('chief treasurer'), a Temenggong and 100 boys and 100 girls of noble family. He was installed as Sultan Muhammad Shah in 1470.

The system of administration adopted by the sultanate was largely modelled on that Malacca. Pahang promulgated court traditions based on the Malaccan system as enshrined in both Undang-Undang Melaka and Undang-Undang Laut Melaka, and enforced the existing adat and religious rules to maintain social order. All rules, prohibitions and customs that have been codified as laws, were in turn collected through oral traditions and memorised by senior ministers. Although Pahang was already a sultanate, it retained its status as a Malaccan vassal, although the nature of the relationship tended to change in later years depending on who was in power.

The boundaries of Sultan Muhammad's realm stretched from Sedili Besar to the borders of Terengganu, which was ruled by a chieftain at the time and was also a Malaccan vassal. His royal court is said to have been established at Tanjung Langgar, Pekan, which was also thought to be the seat of rulers of the Old Pahang Kingdom.

Death
Sultan Muhammad died on 17 September 1475, possibly from poisoning based on the Portuguese records, and was buried at Langgar, Dusun Pinang, Pahang. He is styled as Marhum Langgar ('the late ruler who was buried at Langgar') thereafter, and was succeeded by his elder brother, Raja Ahmad.

The tombstone at the grave of Sultan Muhammad, contain epitaph in Arabic detailing his descent and the date of his death. The inscriptions corroborates the account provided by the Malay Annals with regards to the genealogy of Melaccan Sultans. The translation from Arabic as follows:

"There passed away Sultan Muhammad Shah (on whom God have mercy) son of Sultan Mansur Shah, the son of the late Muzaffar Shah, the son of the late Muhammad Shah,(God have pity on them), on Wednesday night, sixteen days of the month Jumada al-awwal, in the year eighty and eight hundred of the era of the Chosen Prophet"