Over the years, Pahang grew independent from Melakan control and at one point even established itself as a rival state to Melaka until the latter's demise in 1511. At the height of its influence, the Sultanate was an important power in Southeast Asian history and controlled the entire Pahang basin, bordering to the north, the Pattani Sultanate, and adjoins to that of Johor Sultanate to the south. To the west, it also extends jurisdiction over part of modern-day Selangor and Negeri Sembilan. During this period, Pahang was heavily involved in attempts to rid the Peninsula of the various foreign imperial powers; Portugal, Holland and Aceh. After a period of Acehnese raids in the early 17th century, Pahang entered into the amalgamation with the successor of Melaka, Johor, when its 14th Sultan, Abdul Jalil Shah III, was also crowned the 7th Sultan of Johor. After a period of union with Johor, it was eventually revived as a modern sovereign Sultanate in the late 19th century by the Bendahara dynasty.