 After Malacca was defeated by the Portuguese, it was ruled by the Sultanate of Johor.By 1760, however, Johor which was having trouble from the Dutch, decided to allow the state to find a leader from Minangkabau in Sumatra.Between 1760 and 1770, a council of leaders known as the penghulu luak (the predecessor of the Undangs today) left for Pagar Ruyung in Minangkabau in search of a leader.