Ayutthaya's first king, Ramathibodi I, was both a warrior and a lawmaker. Some old laws codified in 1805 by the first Bangkok king date from this much earlier reign. King Ramathibodi I and his immediate successors expanded Ayutthaya's territory, especially northward towards Sukhothai and eastward towards the Khmer capital of Angkor. By the 15th century, Ayutthaya had established a firm hegemony over most of the northern and central Thai states, though attempts to conquer Lanna failed. Ayutthaya also captured Angkor on at least one occasion but was unable to hold on to it for long. The Ayutthaya kingdom thus changed, during the 15th century, from being a small state primus inter pares among similar states in central Thailand into an increasingly centralized kingdom wielding tight control over a core area of territory, as well as having looser authority over a string of tributary states.