Australian prime minister Julia Gillard said she was confident the soldiers’ mission to hand over security responsibilities to Afghan forces was nearing completion, and justified a withdrawal by the end of 2013.

Australia, with 1,550 troops in Afghanistan, represents the largest force provided by any country outside NATO during the decade-long war.

The soldiers have been training the Afghan National Army brigade to secure Uruzgan province. This objective has been helped by the death of Osama bin Laden.

In a speech to the Australian Strategic Policy Institute in Canberra Gillard said: “This is a war with a purpose. This is a war with an end. We have a strategy, a mission and a timeframe for achieving it.”

The start of the withdrawal would be dependent on Afghan president Hamid Karzai, who is expected to announce a security transition over the next few months.

Australia will consider keeping some special forces soldiers in Afghanistan beyond 2014, and will help fund the costs of Afghan security forces, Gillard said. The prime minister said she and Karzai will sign a partnership agreement at a meeting of Nato nations’ leaders in Chicago next month.

“Australia has an enduring national interest in ensuring that Afghanistan does not again become a safe haven for terrorists,” Gillard said.

A total of 32 Australian soldiers have been killed in the conflict, leading to decreased public support of Australian’s role in the war.

With Australia’s federal election due next year, opposition senator George Brandis suggested the early withdrawal is an attempt by Gillard to boost support for her Labor party.

“It would be a shameful thing if, after nearly 12 years of deployment in Afghanistan and the loss of more than 30 Australian lives, this mission was foreshortened for reasons of domestic political convenience for the Labor party rather than on the basis of the advice of the military commanders in the field,” Brandis said.