By the early 19th century, the Johor-Pahang-Riau-Lingga empire had begun to break up. Based in Lingga, Mahmud Shah III exercised little power over his empire. This enabled the emergence of a number of powerful chiefs from the same family, such as Temenggong Abdul Rahman (great great grandson of Abdul Jalil Shah IV, second cousins once removed to Mahmud Shah III) and Tun Abdul Majid (grandson of Abdul Jalil Shah IV and first cousins once removed to Mahmud Shah III).