Australia's longest war has come to an end with the closure of its military base in the southern Afghanistan province of Uruzgan, the withdrawal of its last combat troops, and the tallying of the cost of its 12-year engagement, dpa reported. A total of 40 soldiers were killed, 261 seriously injured and 7.5 billion Australian dollars (6.7 billion US dollars) spent in trying to rout al-Qaeda and subjugate the Taliban, Prime Minister Tony Abbott said Monday. "But that sacrifice hasn't been in vain," Abbott said. "Uruzgan today is a very significantly different and better place than it was a decade ago." Around 400 military personnel will remain in Afghanistan in training and support roles, mostly in Kabul and in the southern city of Kandahar, the country's second-largest. "Obviously that gives us a capacity to keep an eye on things, which we'll exercise," Abbott said. Canberra has committed 100 million Australian dollars a year to help fund Afghanistan's defence force.