The US commander of international forces in Afghanistan on Sunday hailed the achievements of 13 years of fighting against the Taliban, as NATO formally ended its war at a ceremony in Kabul.