A decorated Australian Special Forces soldier has been killed by small arms fire in Afghanistan, becoming the nation's 40th casualty in the protracted conflict.

Chief of Defence David Hurley said the soldier died during an insurgent engagement on Saturday in which another soldier was shot and seriously wounded and an airman injured.

"Members of the patrol provided immediate first aid to the casualties," General Hurley told reporters in Canberra.

"Sadly, despite their efforts, they could not save one of their mates."

The special forces soldier who died, who has not been named, was on his fifth tour of Afghanistan and had previously served in Iraq and East Timor.

"He was the man to watch, never happier than when the situation demanded decisive action and courage," Hurley said.

The two others wounded in the attack are recovering in Afghanistan, with the soldier who was shot able to contact his family.

"As with each of these incidents, I will also appoint an inquiry officer to fully examine the circumstances surrounding this event," Hurley said.

The death comes as Australia is preparing to wind down operations in Afghanistan where its main base in Tarin Kot, Uruzgan province, is expected to close by the end of the year.

Australia still has some 1,550 troops in Afghanistan but plans to withdraw the bulk this year, earlier than planned due to security gains.

Australia, a close ally of the United States began its Afghan deployment in late 2001.