Later on, during the reign of King Ramatibodi I (1350-1369), in the early Ayutthaya period, an administrative reform was introduced whereby the whole administrative machinery which had been centralized in the person of the King, was divided into four distinct departments, namely, Wiang (Local government), Wang (Royal Household), Khlang (Treasury) and Na (Agriculture). The conduct of foreign affairs was then entrusted to "Krom Phra Khlang" although the King still retained the conduct of foreign policy.