As the new Mahāvihāra Theravāda school became dominant in Sri Lanka, it gradually spread through mainland Southeast Asia. Theravāda established itself in Myanmar in the late 11th century, in Thailand in the 13th and early 14th centuries, and in Cambodia and Laos by the end of the 14th century. Although Mahavihara never completely replaced other schools in Southeast Asia, it received special favor at most royal courts. This is due to the support it received from local elites, who exerted a very strong religious and social influence.