In 1287, the Yuan Dynasty launched their third invasion of Đại Việt. This military campaign was ended by a disastrous defeat of the Yuan navy in Battle of Bạch Đằng on March 8 of Lunar calendar, 1288. After fighting in Battle of Bạch Đằng, Phạm Ngũ Lão ambushed Prince Toghan's retreating troops, destroying half of the Yuan army. As a results of his battlefield achievements, Phạm Ngũ Lão was promoted to Commander of the Royal Guard after the war(Quản Thánh dực quân).