Mahmud Shah I of Pahang

Sultan Mahmud Shah ibni Almarhum Sultan Muhammad Shah (died 1530) was the fifth Sultan of Pahang from 1519 to 1530. He succeeded his cousin, Mansur Shah I upon his death in 1519. His eleven years reign was marked with close relations with his namesake Mahmud Shah, the last Sultan of Malacca, in supporting the latter's struggle against the Portuguese in Malacca, bringing Pahang into a number of armed conflicts with Portugal.

Personal life
Sultan Mahmud was known as Raja Mahmud before his accession. He was the youngest of the three sons of the first Sultan of Pahang, Muhammad Shah by his wife Mengindra Putri, a princess from Kelantan. His first royal wife was his first cousin Raja Putri Olah binti al-Marhum Sultan Ahmad, daughter of the second Sultan of Pahang.

Shortly after his accession, Sultan Mahmud visited his namesake cousin, the deposed Sultan of Malacca, Mahmud Shah, who was exiled at Bintan after the conquest of Malacca in 1511. There, he married Raja Khadija, one of the daughters of his cousin. The marriage was designed to strengthen the position of Mahmud Shah of Malacca in his fight against the Portuguese.

From his marriage to Princess Olah, Sultan Mahmud had issued two sons, the eldest being Raja Muzaffar, who later succeeded him in 1530 as the next sultan, and the younger Raja Zainal.

Reign
At the beginning of his reign in 1519, it was claimed in Os Portugueses em Africa, America e Oceania that a Portuguese ambassador Duarte Coelho had secured an agreement with the Sultan for an annual tribute of a cup of gold, to establish Pahang as a vassal of Portuguese Malacca. However, the agreement was thought to have been nullified shortly afterwards, following the marriage alliance established in the same year between Sultan Mahmud and the deposed Sultan of Malacca, Mahmud Shah of Bintan.

Ignorant of this development, Albuquerque sent three ships to the port of Pahang for provisions, where two of their captains and thirty men were killed. The third captain escaped, but was killed with all his men at Java. Valentyn records that in 1522 a Portuguese fleet under the command of Antonio de Pina and his assistant Bernaldo Drago, who had landed at Pahang port, not knowing that the Sultan there was a son-in-law of Sultan Mahmud of Bintan, were ambushed and killed. The captured survivors were sent to Bintan and forced to embrace Islam, while those who refused were executed by blowing from a gun.

In 1523 Sultan Mahmud Shah of Bintan laid siege to Malacca with Mahmud Shah of Pahang as his ally, and gained a victory over the Portuguese in the Muar River. The Laksamana attacked shipping on the roads of Malacca, burnt one vessel and captured two others. At this crisis, Martim Afonso de Sousa arrived with support, relieved the city, and pursued the Laksamana into Muar. Then he proceeded to Pahang, destroyed all the vessels in the river and killed over six hundred people in retaliation for the assistance given by their ruler to the Sultan Mahmud of Bintan. Some were carried into slavery. A detailed account of Portuguese operations in Pahang during 1522 and 1523 is given by Fernão Lopes de Castanheda. In 1525, Pedro Mascarenhas attacked Bintan and Pahang sent a fleet with two thousand men to help the defenders. The forces arrived at the mouth of the river on the day the bridge was destroyed. Mascarenhas despatched a vessel with Francisco Vasconcellos and others to attack Pahang's forces which quickly fled. After the destruction of Bintan, Sultan Mahmud of Bintan retreated to Kampar where he died in 1528 and was posthumously known as Marhum Kampar. He was succeeded by a son Alauddin Shah II who was fifteen years old, and who later established the Johor Sultanate. The Alauddin Shah II visited Pahang about 1529 and married Raja Kesuma Dewi, the first cousin once removed to Sultan Mahmud of Pahang and daughter of Mansur Shah I.

Death
Sultan Mahmud died in 1530 of unknown cause, and was succeeded by his first son, Raja Muzaffar. He was posthumously styled as Marhum di Hilir ('the late ruler who was buried downstream').