 His reign in exile is considered officially ended after the installation of a distant relative, Raja Bujang to the Pahang throne in 1615, with the support of the Portuguese following a pact between the Portuguese and Sultan of Johor.Raja Bujang who reigned as Abdul Jalil Shah was eventually deposed in the Acehnese invasion in 1617, but restored to the Pahang throne and also installed as the new Sultan of Johor following the death of his uncle, Abdullah Ma'ayat Shah in 1623.This event led to the union of the crown of Pahang and Johor, and the formal establishment of Johor Empire.