In early 1285, the Mongols invaded Vietnam for a second time. Togon led his army to attack Gia Lâm, and surrounded the Vietnamese capital, Hanoi. Grand emperor Trần Thánh Tông and emperor Trần Nhân Tông went to Tam Trĩ by means of a small boat, while the official royal boat went to Ngọc Sơn to mislead the invaders, but they were discovered. On March 9, Yuan marine troops surrounded Tam Trĩ and almost captured both the grand emperor and the emperor. Needing time to consolidate and organize the army and slow down the pace of the Mongol army, Thánh Tông offered his younger sister, princess An Tư, to Togon, as a gift.