Pahang was under the rule of several regional powers. It was a vassal state of Siam in the 14th century. Pahang became a distinct political entity during the Malacca Sultanate, circa 1454; Raja Muhammad, the son of Sultan Mansur Syah, was made its sultan in 1470. Following the downfall of the Malacca Sultanate, the Johor-Riau Empire had a stronghold over Pahang. It then became a fief of the Bendaharas of Johor-Riau by the beginning of the 19th century.
A civil war in the middle of the 19th century resulted in Bendahara Wan Ahmad proclaiming himself Sultan. However, British interest in Pahang’s mineral resources and the British movement in the Malay Peninsula forced Sultan Ahmad to accept a British Resident in 1888.
In 1896, Pahang became one of the four Federated Malay States; this lasted until the Japanese invasion in 1941. It came under the British Military Administration (BMA) in 1945 upon the surrender of the Japanese; the Malayan Union comprising Pahang, nine other Malay states, Penang and Malacca was formed in the same year. In 1948, it became part of the Federation of Malaya which later achieved independence on 31 August 1957.