During the 15th century the Ayutthaya Kingdom fought frequent wars against the Lan Na Kingdom in the north, the Khmer Empire of Angkor Wat to the east and the Malay States to the south. King Intharacha of Ayutthaya forced the former Kingdom of Sukhothai to recognize his authority in 1410. The king then invaded Lan Na in 1411, seizing Chiang Rai but failing to capture Chiang Mai and Phayao. In the latter battle the two sides may have used early cannons. In 1424 King Borommarachathirat II ascended the throne of Ayutthaya. After a seven-month siege, he captured Angkor by treachery in 1431. The Khmer retook the city in 1432 and subsequently transferred their capital to Phnom Penh. The sixth son of the Lan Na king Sam Fang Kaen, Thao Lok, ascended the throne in the aftermath of coup against his father in 1441. Thao Lok was crowned as king Tilokaraj of Lan na, later banishing his father Sam Fang Kaen to Muong Shan in the Shan States. General Phya Samdekyoki, who had previously played an important role in bringing Tilokaraj to power created a plot in order to assume power himself, the plot was however discovered and Samdekyoki was exiled to Chiang Saen.. How many sons did Sam Fang Kaen have before Thao Lok?