It was a quiet way to end a war, under a sunny sky at coalition headquarters on the most heavily guarded lawn in all of Kabul. There was no band and no jubilation. The Canadian flag was lowered to a subdued recording of the national anthem and carried away. After a few salutes and speeches the last 100 troops of more than 40,000 deployed here retreated to a courtyard for cigars and burgers.

The mission in Afghanistan was Canada’s biggest military effort since the Second World War. For the past 12 years it has stirred debate about the price of progress. Soldiers fought hard here and Canada lost more of them than any other NATO nation. IEDs (improvised explosive devices) altered many lives in ways that are irreparable and countless more wounded cope with the emotional holes dug by the need for 158 ramp ceremonies.

For me, it is also an ending. I have made nearly a dozen trips to Afghanistan since 2006 to cover the Canadian mission for CTV. I joined soldiers on foot patrols, in armoured vehicles, during firefights, on medevac helicopters, in hospitals and too often at the foot of that ramp on the tarmac after something had gone terribly wrong.

Now the mission will linger in debate as people ask, “Was it worth it?”

A definitive answer is still a work in progress and the factors shaping the outcome appear beyond anyone’s control. More than 100,000 foreign troops and billions of dollars have failed to stabilize let alone rebuild.

“Afghanistan is a different country. We can’t use our Western perspectives,” said Maj.-Gen. Dean Milner, who was in command of Canada’s training mission in the final year. “But I can tell you absolutely that the Taliban is less capable.”

That is not to say Afghanistan is a safer place than when Canadian Forces first landed. It is not. Security continues to deteriorate and every year proves worse than the one before. Afghan civilians are dying by the thousands and violence does not discriminate. Last year was the deadliest yet for women and children, according to the United Nations, most of them falling victim to IEDs. The UN also noted a rise in civilian casualties because of more fighting between Afghan security forces and enemies including the Taliban.

People used to be able to drive along a newly paved highway from Kabul to Kandahar. Now most Afghans do not dare to venture much beyond the city limits. The Taliban still holds sway in at least 9 of 34 provinces.

I made my first trip into Kandahar City in 2006. I ate lunch at a restaurant and walked down the street. In a fabric shop I browsed and talked with two women in burkas. They giggled that they had never met a foreigner; I was fascinated that their burkas had lipstick stains on the inside.

My last trip to Kandahar City was in July 2011. I hunched in the back seat of a Toyota Corolla wearing a burka. We could not spend more than 15 minutes at either of the locations deemed safe enough to do interviews. I could not set foot on the street. When we were pulled over by a man waving an AK-47 my heart raced and stomach sank. He was a policeman who figured out that we were foreigners. He recommended that we work quickly and get out of town.

The Taliban’s information arm released a statement this week heralding “victory and freedom from the Canadians.”

“The Canadians who crossed the Atlantic are now retreating back to hide in their safe haven,” said the statement in Pashtu. “(Today) was the last day of this snake in this land and it has officially ended its occupation.”

Propaganda is what remains around Kandahar with the schools and roads the Canadians built. The Taliban wants a mostly illiterate population to believe that foreigners are temporary and only the Taliban will endure.

Is Afghanistan better off than it was before Canadians arrived?

In certain ways, yes, Afghanistan is better off. In 2001 it was a country disfigured by war and warped by extremist ideology. Women had no rights. People had no say. It was authoritarian rule by oppression, fear and impunity. That is not to say Afghanistan is a paradise now or that foreign intervention was a cure-all but the alternative was far worse.

“My mother is a doctor and during Taliban time she gave an education to me and other girls secretly in our house,” said Dr. Hamida Wardak, who is vying for a provincial council seat in next month’s elections. “This is still a male-controlled society... but you cannot compare to what it was like before.”

Measuring progress is difficult because it is so uneven. It is true that more girls are going to school and improved maternal care has helped the infant mortality rate. Women in cities like Kabul can go shopping without a male escort or even take jobs.

Yet on the fringes and in remote villages, Afghanistan is still one of the world’s worst places to be a woman.

Recently I was shown a video from a mobile phone of a young woman covered with a burka and blankets. It is impossible to know if she is a teenager or older but age seems irrelevant to the man who is beating her. He has a white beard, a turban and a whip. He thrashes her across her back and legs and when he tires another man takes his turn. The video then reveals a crowd is watching. They are all men.

I have seen videos like it during past reporting trips here. In each, the woman dares not whimper or cry or protest. When the punishment for whatever crime she has committed is declared complete she finds her balance and hobbles off on her own. In this latest one she lowers her head and pauses. Maybe she is reminding herself that this is 2014.

This is a critical year for Afghanistan. The United States will begin withdrawing troops and Afghan president Hamid Karzai has refused to sign an agreement that would see several thousand stay on. Elections next month will see the first-ever transition of elected power but nobody expects them to be free or fair.

“Wholesale fraud” is what presidential candidate Abdullah Abdullah told me he expects. He says the greatest risk facing Afghanistan right now is the world’s short attention span.

Afghanistan is struggling to build an economy beyond international aid because donor countries will eventually tire of being donors. It needs to make the payroll for 352,000 Afghan security forces and find jobs for a generation of restless young men with too much time and too few options.