In December 1284, the second Yuan invasion of Đại Việt began under the command of Kublai Khan's son Toghan. Đại Việt was attacked from two directions, with Toghan himself commanding the infantry's invasion from the northern border while the Yuan navy under General Sogetu advanced from the southern border through Champan territory. At the beginning of the war, Thánh Tông and Nhân Tông ordered the army to retreat to avoid pressure from the Yuan force when Prince Chiêu Minh Trần Quang Khải commanded troops try to stop Sogetu's fleet in the Nghệ An Province. During this time, several high-ranking officials and members of the Trần royal family defected to Yuan forces, including Thánh Tông's own brother Prince Chiêu Quốc Trần Ích Tắc, and Trần Kiện, who was the son of Prince Tĩnh Quốc Trần Quốc Khang. For the safety of Thánh Tông and Nhân Tông's retreat, Princess An Tư was offered as a gift and a diversion for Toghan, while Marquis Bảo Nghĩa Trần Bình Trọng was captured and later killed in the Battle of Đà Mạc while defending the two emperors. At the southern border, Trần Quang Khải was also forced to retreat under the pressure of Sogetu's navy and the defection of the governor of Nghe An. Despite the repeated problems, the royal family and royal court of the Trần dynasty maintained their harmony and determination owing to favourable decisions and actions from Thánh Tông, Nhân Tông, Trần Quốc Tuấn and Trần Quang Khải.