In both cases, Western-backed security forces boosted with billions of dollars in training and equipment crumbled in the face of sudden assaults from a smaller contingent, leaving observers wondering if the expense and effort was worth it.
And in the aftermath of both defeats, experts questioned the leadership of the national governments.
"It's really a scary parallel to Mosul, it's really uncanny," said Patrick Skinner, director of special projects for The Soufan Group intelligence consultancy based in New York.
"A decade of spending unbelievable amounts of money, proclamations of an improving military... they were not supposed to be able to take Kunduz, and last year when Mosul fell, (the Islamic State group was) not supposed to take that."
Afghan troops backed by limited US air support launched a counteroffensive on Tuesday to try to retake Kunduz, a day after Taliban insurgents overran the strategic northern city in their biggest victory since being ousted from power in 2001.
Iraqi security forces also pledged to quickly retake Mosul after it fell in June last year — but the city remains an IS stronghold.
"The immediate response is 'We'll take it back,'" Skinner said. "Well, that's not the point. The government was supposed to be able to hold it."
Stephen Biddle, a military expert and professor at George Washington University, said an important similarity between Kunduz and Mosul is that in both cases, the security forces had suffered from years of corruption.
"Military effectiveness is a lot more than just having the right weapons and sitting through a bunch of training classes," he said.
"When the chain of command is politicised or corrupt, it's very hard for them to generate combat motivation in the ranks."
In a draft paper touching on the problems America has training and equipping foreign fighters, Biddle notes that the US aim of having a professionalized allied force seldom jives with the goals of ruling elites in Iraq, Afghanistan and elsewhere.
In such places, leaders often try to ensure the personal loyalty of the officer corps through corruption and cronyism.
"Leaders of such states... cannot treat their militaries as disinterested defenders of the state against foreign enemies; the armed forces are natural rivals and potential threats," Biddle wrote.
Ahmed Rashid, a Pakistani author and journalist who is an expert on the Taliban, told AFP the Afghan forces numbered between 5,000 to 7,000 in Kunduz but were routed by a much smaller Taliban contingent, perhaps of just 1,000 men.
"The government is totally disorganised and the defence ministry is in a shambles," he said.
"There was no strategy, no ability to defend the city. There is a lack of political leadership."
Similarly, in Mosul, many thousands of trained Iraqi forces fighters melted away when confronted with a far smaller attacking group of IS extremists.
But Pentagon press secretary Peter Cook cautioned against drawing parallels.
"We are looking at uniquely different situations; I am not sure you can compare these two directly," Cook said. "The circumstances and the players are different."
Some experts also cautioned against making too swift of a comparison.
Jawid Kohistani, a Kabul-based military analyst, stressed that Mosul has become an Islamic State stronghold that threatens other Iraqi cities.
"But here in Kunduz, the whole province is not under Taliban control. And there is no threat to neighboring provinces from Kunduz yet," Kohistani said.
A Western official who asked to remain anonymous said the Mosul comparison was "overblown" because the Taliban have not yet demonstrated a strong desire to hold Kunduz.
"Chasing away the security forces and posing for selfies is a very different thing from cementing control of territory," the official said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ