Southeast Asia had three large kingdoms, one of which was the Pagan kingdom. Around 840, the Burmans created the Pagan kingdom. This kingdom was in the Irrawaddy River Valley. King Anawrahta ruled from 1044 to 1077. During his rule he conquered much of the surrounding area, which gave the Pagans access to ports, allowing the kingdom to prosper. The Pagan kingdom followed Buddhism and built many Buddhist temples. In the late 1200's Kublai Khan demanded that the king pay tribute. He refused and ordered an attack on the mongols, during this attack the Pagan army was slaughtered. Afterwards the king's son killed him and paid the tribute, Pagan survived but lost all its power. Another kingdom during this time was Khmer Empire. The Khmer Empire was established in what is now Cambodia. Soon it began to conquer nearby kingdoms until it controlled much of the southeastern mainland. The Khmer practiced both Hinduism and Buddhism, in the capital Angkor, a large temple was built called Angkor Wat. The empire prospered for about 400 years until overspending and repeated invasion caused its fall. The third kingdom is Vietnam, it was originally called Nam Viet in 111 B.C. before being conquered by China. When the Chinese dynasties grew weak the Vietnamese attempted to regain control. Though a few had come close, it was not until the fall of the Tang dynasty that the Vietnamese were independent from China. After this success they renamed the kingdom Dai Viet. The Chinese and Mongols made attempts to conquer Dai Viet, but none were successful.