This past June, Canada took a pass on an invitation from NATO to jump back into the Afghan conflict.

With hindsight, every indication is that Canadian forces avoided a painful and increasingly dangerous mission to pull Afghanistan out of its nosedive.

"We remain committed to helping Afghanistan build a stable, secure, prosperous and democratic country," said Natasha Nystrom of Global Affairs Canada.

That commitment, however, did not extend to matching U.S. President Donald Trump's decision to increase U.S. forces in the country.

"Canada is not currently planning to send military personnel to the Resolute Support mission," said Nystrom, referring to the NATO-led mission that began in 2015.

The specific task that Canadians were asked to perform — training Afghan forces — became even more dangerous this year, with no fewer than 52 "insider attacks" against their Afghan comrades and against Western trainers recorded up to Aug. 15.

Afghan forces diminishing

Meanwhile, the forces Canada was invited to train continued to melt away. The Afghan National Army shrank by 5,000 troops this year, and the Afghan National Police suffered a net loss of 4,000.

Those losses are caused by a combination of combat casualties, desertions and defections to the Taliban. The Afghan government has been recruiting aggressively, but remains unable to stem the bleeding.

John Sopko, the U.S. government's special inspector-general for Afghanistan reconstruction, says the losses are the most worrying trend facing the country.

A member of Afghanistan's Special Forces unit jumps from a wall during patrol in Pandola village near the site of a U.S. bombing in eastern Afghanistan in April. A new report shows more districts have fallen under Taliban control this year. (Parwiz/Reuters)

The continuing lack of army and police officers "undermines the viability of the Kabul government and impedes U.S. efforts to disengage from combat operations in Afghanistan," he wrote in a report released Monday. "Clearly, the time is ripe to ask why an undertaking begun in 2002 and costing $70 billion has — so far — not yielded bigger dividends."

The report lays out a series of metrics that reveal trends in the Afghan war. All are headed in the wrong direction.

Continuing a steady pattern since at least 2014, more of the country slipped out of government hands to fall under partial or total Taliban control.

Six months ago, 45 of 407 districts in the country were under full or partial Taliban control, according to U.S. Forces in Afghanistan. Today the number is 54.

Taliban control increasing

At the beginning of 2017, approximately three million Afghans' lives were controlled more by local Taliban commanders than by the country's government. Today that number is closer to four million.

The districts lost include areas once defended by Canadian soldiers, and even bigger areas once held by British and American troops.

And though the Taliban have struggled to hold major population centres, they have been able to take provincial capitals and hold them temporarily, forcing the government and its foreign backers to unleash punishing airstrikes on their own cities.

That helps to explain another grim metric: a 52 per cent increase, according to the United Nations, in the number of Afghan civilians killed by foreign airstrikes in the first nine months of this year, compared to the same period last year.

U.S. forces in Afghanistan are also more exposed. The number killed and wounded in action during the first eight months of this year is double that of the same period in 2015 and 2016.

Training remains a combat mission

From Canada's point of view, one alarming statistic may be the sharp uptick in so called "green-on-blue" killings, in which Afghan soldiers, police or cadets turn their guns on their Western mentors and trainers, which is the role NATO asked Canada to take on in June.

Attacks by Afghan security force members on their Western counterparts are running at about one a month this year, more than double the rate last year.

Efforts to prevent those attacks by forcing Afghan soldiers to be disarmed when on bases shared with Western forces have not prevented the phenomenon, and appear to have provided the Taliban with new opportunities to attack Afghan army bases.

One such attack on the Afghan National Army's 209th Shaheen Corps in Mazar-i-Sharif in April may have killed over 250 soldiers — the deadliest attack on Afghan security forces since the U.S. invaded the country in 2001.

Again, insiders are believed to have helped the Taliban suicide attackers gain entry to the base, where they slaughtered unarmed cadets in the mosque and the mess hall.

Attacks bigger, bolder

There have been other deadly attacks, too, this year, bigger and bloodier than those the Taliban have staged in the past.

On Oct. 19, the Taliban all but wiped out an army base in Maiwand, Kandahar, once part of the Canadian Army's area of responsibility. Only two Afghan soldiers survived unscathed; 43 died. Six are missing, again raising suspicions of infiltration.

Afghanistan has been hit by a wave of bombings and attacks in recent weeks. Here, officials inspect the scene of a Taliban attack in Andar district last month. (EPA-EFE)

And in the heart of Kabul, the Taliban detonated its most deadly truck bomb of the war, killing at least 150 people on May 31. More died in the following days when the Taliban suicide-bombed a funeral for one of the victims, and Afghan police opened fire on demonstrators protesting the lack of security.

It all makes it harder than ever to picture an ending that allows Western forces in the country to declare victory and go home.

"Our nation must seek an honourable and enduring outcome worthy of the tremendous sacrifices that have been made," Trump said in August, as he announced he would send an additional 4,000 troops to the country. "The consequences of a rapid exit are both predictable and unacceptable."

Canada is sending some money: $195 million over three years to support the faltering Afghan security forces.

But after 12 years pouring blood and treasure into the Afghan quagmire, Canada has little desire to wade back into the mire.