Beginning late in the thirteenth century, two factors markedly altered the power configuration in Southeast Asia: The first factor was the Mongol invasion of Southeast Asia and the consequent rise of the Thais and of the Majapahit empire; the second was the advent of Islam and the rise of Malacca. For well over a millennium, the major power center of Southeast Asia had been in the region of present-day Cambodia and South Vietnam. The Mongol invasions and the development of the Thai state upset the Khmer supremacy in mainland Southeast Asia. In the fourteenth century, Thailand and the Majapahit empire competed for maritime trade. In the following century, the trade rivalry became triangular, with Malacca as the third competitor.