Canada has lowered its flag for the last time at Kandahar Airfield, marking the end of the Canadian Forces combat mission.

The Maple Leaf was lowered in a ceremony at the airfield about five months after the end of the combat role, following a rotation of Canadian Forces whose task was to clean, pack up and ship the leftover supplies from the mission.

The military first went into Kandahar in 2005, the beginning of the combat mission. The forces are now into a training mission based in Kabul, where they're teaching Afghan national security forces.

Kandahar was Afghanistan's most dangerous province, Defence Minister Peter MacKay said in a statement.

"Over the past several years, Canada and the Canadian Forces played a significant role in establishing the security foundation in Kandahar province that set the conditions for governance and development," he said.

"Our commitment is now centred in Kabul, with our military contribution to the NATO training mission, which is building the professional capacities of the Afghan national security forces."

A spokesman for the Canadian Forces says there are less than 500 Canadian personnel left in Kandahar, and they should all be out by Dec. 12.

On Wednesday, Canada's tactical airlift unit returned to CFB Trenton after 10 years in Afghanistan. The unit flew the CC-130 Hercules aircraft to transport personnel and equipment in and out of Kandahar Airfield, and flew operations in Afghanistan in support of NATO missions.

A total of 158 Canadian Forces members have been killed during the mission in Afghanistan, including one since the start of the training mission. One diplomat, one journalist and two aid workers have also been killed.