Sultan Haji Ahmad Shah Al-Musta'in Billah Ibni Almarhum Sultan Abu Bakar Riayatuddin Al-Muadzam Shah (Jawi: سلطان حاج احمد شاه المستعين بالله ابن المرحوم سلطان ابو بكر رعاية الدين المعظم شاه) was the fifth Sultan of Pahang, and also served as the seventh Yang di-Pertuan Agong (High King) of Malaysia from 26 April 1979 to 25 April 1984.
Born 24 October 1930 at Istana Mangga Tunggal, Pekan, Pahang. he was the only son of Sultan Sir Abu Bakar Riayatuddin Al-Muadzam Shah ibni Almarhum Sultan Abdullah Al-Mutassimu Billah Shah (reigned 1932-1974) by his official and royal consort, Tengku Ampuan Besar Fatimah binti Almarhum Sultan Sir Alang Iskandar Shah II Kaddasullah, a princess of Perak royal family. He succeeded his father as sultan in 1974.
As the Yang di-Pertuan Agong from 1979 to 1984, Sultan Haji Ahmad Shah was automatically designated under constitutional provisions as the Supreme Commander of the Malaysian Armed Forces, holding the rank of the Field Marshal of the Royal Malaysian Air Force, Admiral of the Royal Malaysian Navy and Field Marshal of the Army.
His abdication as Sultan was decided by the Royal Council at an extraordinary meeting on 11 January 2019. A special amendment was passed on the state constitution that gave the body more power for this decision, citing the Sultan's incapability to rule due to his failing health. The abdication came into effect on the midnight of 15 January 2019, paving the way to his son, Abdullah to succeed him as Sultan the following day, and subsequently be elected as the next Yang di-Pertuan Agong later the same month.