PRIME Minister Julia Gillard has defended Australia's continuing military presence in Afghanistan after five soldiers died in two separate incidents in the space of 24 hours.
It was Australia's deadliest day of combat since the Vietnam War, and brought to 38 the number of Australian soldiers killed in Afghanistan since 2001.
In the first incident, three soldiers were killed and two were wounded in Uruzgan province when a man wearing an Afghan national army uniform opened fire on a group of Australians who were relaxing at the end of the day.
Acting Chief of Defence Air Marshal Mark Binskin said Australian soldiers returned fire as the gunman fled the scene. He said a manhunt was under way to capture the shooter.
The deceased soldiers were based at Gallipoli barracks in Brisbane. Their names were yet to be released at the request of their families.
One was a 40-year-old lance corporal who was on his second tour of Afghanistan. He was also an Iraq War veteran.
The other soldiers - a 23-year-old private and a 21-year-old sapper - were on their first military deployments.
Queensland Premier Campbell Newman said it was a "very sad day for Queensland".
Mr Newman, a former military man, once served in the same unit as the 21-year-old sapper.
"My last army posting before I left my time at the defence force was as the operations officer at 2nd Combat Engineer Regiment and I have a deep sense of comradeship with all men and women who serve in that particular unit," Mr Newman said.
In the second incident, two Special Forces soldiers - privates, aged 30 and 23 - died when the International Security Assistance Force helicopter they were passengers in crashed in Helmund province.
No further details were available as the mission the pair was a part of was ongoing, Air Marshal Binskin said.
Ms Gillard, who last night cut short her trip to the Cooks Islands to return to Australia, offered her condolences to the families of the dead soldiers.
She said it was important Australia's resolve remained strong as it absorbed the "truly shocking" news.
But she pointed to the 10-year anniversary of the Bali bombings as a powerful reminder of why Australian needed to stay the course in Afghanistan.
"It is important that Australians understand this is a war with a purpose and it is a war with an end," Ms Gillard said.
"We went to Afghanistan because we knew that in Afghanistan people had been trained and came and took Australian lives."
She said plans to withdraw the bulk of Australia's troops in the next 12-18 months remained.
The Uruzgan attack, which occurred about 20km north of Tarin Kowt, brought to seven the number of Australians killed in so-called "green on blue" attacks. Three Australians were gunned down in a similar attack on October 29 last year.
Air Marshal Binskin said while the "insider threat" remained a concern, Australian troops remained committed to their mission.
He said he was confident the deaths would not "drive a wedge" between Australian and Afghan forces.
"I think morale at the moment has taken a hit over this, understandably, but I don't think it's taken the will for us to fight and work with the Afghan forces," he said.
"We remain committed to the transitional mission in Afghanistan."
Air Marshal Binskin said the shooting would be the subject of Australian Defence Force and ISAF investigations.
In describing it as a "terrible day" for the nation, he said the timing of the deaths added to the complexity of the situation.
Opposition Leader Tony Abbott described it as a "terrible tragedy" and a "black day for our defence forces".
Update your news preferences and get the latest news delivered to your inbox.