 Aware of the situation, Thánh Tông and Nhân Tông began to prepare the Trần dynasty for the obvious and inevitable war while tried to keep a flexible policy with the Yuan dynasty.Firstly, Prince Chiêu Văn Trần Nhật Duật was appointed for the mission of pacifying the revolt led by Trịnh Giác Mật in Đà Giang by diplomatic means in order to keep the country in stability before the war.With his knowledge of minority people's language and culture, Trần Nhật Duật successfully accomplished his task in 1278, hence, the Trần dynasty had free hand to deal with the threat from the North.