 In the year 1347, Gajah Mada the military leader of Majapahit installed Adityawarman as the king of Melayu to prevent the revival of Srivijaya.Adityawarman later conquered Tanah Datar to take control of the gold trade and founded a kingdom in Pagar Ruyung.In the year 1377, the Majapahit defeated Palembang and ended efforts to revive Srivijaya.