 The weakening of the Johor sultanate and the disputed succession to the throne was matched by an increasing independence of the great territorial magnates; the Bendahara in Pahang, the Temenggong in Johor and Singapore, and the Yamtuan Muda in Riau.In 1853, the fourth Raja Bendahara Tun Ali, renounced his allegiance to the Sultan of Johor and became independent ruler of Pahang.He was able to maintain peace and stability during his reign, but his death in 1857 precipitated civil war between his sons.