Lance Corporal Leon Smith, who was killed in a firefight near Kabul last week, was farewelled by his mates in Afghanistan today with a haka.

An Australian Defence Force C-17 transport aircraft took Lance Corporal Smith, an SAS trooper, from Afghanistan to an undisclosed location before being transferred to a flight back to New Zealand, the Defence Force said in a statement.

Australian Chief of Defence Force General David Hurley joined New Zealand, British, US and Australian troops to salute the fallen soldier at a ramp ceremony.

New Zealand's Chief of Defence Force, Lieutenant General Rhys Jones, said he was grateful for the assistance and care provided to Lance Corporal Smith by his Australian counterparts as they had faced the loss of their own in Afghanistan.

"I have also expressed my thanks to others who have helped speed Trooper Smith's return to his family. My thoughts and those of the whole NZDF, and indeed all of New Zealand, are with his family as they face their loss," he said.

A family funeral later this week will be private but the SAS has invited the media to a service at Papakura camp on Thursday.

Lance Corporal Smith, from Wellington, was killed while securing a compound during a joint Afghan Crisis Response Unit/NZSAS operation last week.