Australia will follow the United States and withdraw its final troops from Afghanistan by September this year, Prime Minister Scott Morrison has announced.
The decision marks the end of Australia's troop involvement in the conflict, which began when US forces launched their military offensive in response to the 11 September, 2001, terror attacks in New York City.
Australia currently has around 80 personnel deployed in Afghanistan, with its military presence having been scaled back from a height of 1,500 troops.
US President Joe Biden announced on Thursday (AEST) it was "time to end" America's longest war, 20 years after it began.
Mr Morrison became emotional as he read the names of 41 ADF troops killed while serving in Afghanistan.
"The loss is great, the sacrifice immense, the bravery and courage things we can speak of, but not know of personally," he told reporters.
"Many more were wounded, some physically, others mentally and we'll be dealing with the scars, both mental and physical, of their service, for many, many years."
Mr Morrison was asked whether it was worth going into Afghanistan, given the cost to Australian lives.
"Freedom is always worth it - Australians have always believed that," he said.
Former President George W. Bush launched the offensive in October 2001 in response to concerns Taliban-controlled Afghanistan had become a safe haven for Al Qaeda, the group behind the 11 September attacks.
Former Australian Prime Minister John Howard in the same month committed Australian forces to the conflict as part of the US-led International Coalition against Terrorism.
The Taliban were ousted from power in 2001 by US-led forces, but since then conflict with the militant group has persisted in Afghanistan.
Australia has had around 39,000 troops rotate in the country throughout the course of the conflict.
The United States and Australia's military exit comes as peace talks with the Taliban and Afghanistan's democratic government have failed to advance with the group remaining a potent force in the country.
Mr Morrison recognised the conflict had exacted an "enormous toll" on the people of Afghanistan, and the prospect of peace remained a complex task.
"Australia continues to support the peace negotiations between the Afghan government and the Taliban," he said.
"We encourage both parties to exit to the peace process that so many Australians have died to provide for."
The United Nations has estimated more than 100,000 Afghan civilians have been killed in the 20-year conflict.
Mr Morrison dodged questions about alleged war crimes or whether the ADF could have done better.
"There will be time to talk about those things. Today is not that time," he said.
In his speech at the White House, Mr Biden on Thursday recognised the US objectives in Afghanistan had become "increasingly unclear" over the past decade.
“It was never meant to be a multi-generational undertaking. We were attacked. We went to war with clear goals. We achieved those objectives,” Mr Biden said.
Al Qaeda leader Osama bin Laden was killed by American forces in Afghanistan in 2011.
Mr Biden's announcement extended a 1 May withdrawal deadline, set by his Republican predecessor Donald Trump.
"It’s time to end the forever war,” Mr Biden said.
Mr Morrison said Australians involved in the conflict should be remembered for their service.
"These brave Australians are amongst our greatest ever, who have served in the name of freedom," he said.
"We thank them for their service humbly and gratefully."