Phraya Phetburi (Roeang) was governor of Phetburi, then the Mon population center and royal naval base in King Boromakot's reign. Phraya Ram Chaturon (Chuan) served as chief of Siam's Mon community during the reign of King Ekkathat. Nokiang's father was a Thai commoner. Impressed by the boy, who was the Grand Chancellor of Civil Affairs (, ) in King Boromakot's reign, adopted him and gave him the Thai name Sin (สิน) meaning money or treasure. When he was seven, Sin was assigned to a monk named Thongdi to begin his education in a Buddhist monastery called Kosawat Temple (Thai: วัดโกษาวาส) (later, Choengtha Temple (Thai: วัดเชิงท่า)). After seven years, he was sent by his stepfather to serve as a royal page. He studied Hokkien-Chinese, Vietnamese, and several Indian languages, and became fluent in them. It was the time he learnt Vietnamese, he took his name as "Trịnh Quốc Anh". When Sin and his friend Thongduang were Buddhist novices, they reportedly met a Chinese fortune-teller who told them that both had lucky lines in their hands and would both become kings. Neither took it seriously, but Thongduang would become the successor of King Taksin, Rama I. After taking the vows of a Buddhist monk for about three years, Sin joined the service of King Ekkathat and was first deputy governor and later governor of Tak, which gained him his name "Phraya Tak", the governor of Tak. In 1764, the Burmese army attacked the southern region of Thailand. Led by Maha Nawrahta, the Burmese army was victorious and marched on to Phetchaburi. Here, the Burmese were confronted by Thai soldiers led by two generals, Kosadhibodhi and Phraya Tak. The Thai army beat the Burmese back to Singkhon Pass. In 1765, when the Burmese attacked Ayutthaya, Phraya of Tak defended the capital, for which he was given the title "Phraya Wachiraprakan" of Kamphaeng Phet.