KABUL, Afghanistan -- Earlier this week, U.S. Ambassador to Afghanistan Ryan Crocker confirmed that he would be stepping down from his post at some point this summer.

The official cause was "health reasons," but it is no small matter that Crocker's departure almost immediately follows the final approval of an international military drawdown plan at last weekend's NATO summit in Chicago, and the news that America's top military officer in the country, Gen. John Allen, will also be leaving shortly. Significant changes are afoot in Afghanistan.

A few days before the summit -- and before the latest personnel news broke -- The Huffington Post spoke with Crocker in his residence at the U.S. Embassy about the ongoing challenges facing America's mission in Afghanistan, and what the future might look like.

Below is a lightly edited transcript of selections from the interview.

HuffPost: Can the Taliban be defeated militarily? Is that an end goal, or is it just part of a process that ultimately needs a political conclusion?

Ambassador Ryan Crocker: In my view it's both. I come out of Iraq, as does General Allen. I try not to draw too many parallels -- what you try to do is you inflict enough damage on your adversary that his strategic calculation starts to change, he no longer thinks he's going to win, and then that's when a political settlement comes into the offing.

In a sense that's already underway because over four thousand [Taliban] foot soldiers have already reintegrated, and that’s a pretty sizeable chunk of what they have to fight with. It's why you have not seen the Taliban try to take on either ISAF or Afghan forces frontally, now it's all terrorist attacks and suicide missions, because I don't think they have the manpower, and they know what's going to happen if they try.

HP: And what if they decide, well, we can just wait the U.S. out?

RC: It's going to be a long wait. It's already been more than a decade. You want to let it go another 10 years?

HP: But there are other ways to measure the Taliban's impact -- girls schools are still being shut down, they can still inflict damage with terrorist attacks. Arguably they are not defeated and not close to it.

RC: No. And defeat is always in the mind of the enemy. The enemy decides when he's defeated and when he isn't. Yes, they continue to mount attacks. I was talking to my representative in Command East, and he was noting a fair amount of violence in the east in the past week, but what he found noteworthy was the way the Afghan security forces dealt with it. Increasingly they are in the lead, and it belies the whole Taliban narrative that they are engaged in operations here solely to drive the foreigners out -- they are increasingly fighting their own people.

The Afghan forces have demonstrated now on a variety of occasions the courage, the determination and the ability to prevail.

HP: There have also been hints of a growing problem within the Afghan security forces, so-called green-on-blue attacks, in which Afghans kill their NATO military counterparts. Is there a point where that becomes not just a tactical problem, but threatens to undermine the entire strategy?

RC: Every one of those hurts -- every single loss hurts, but these hurt more. The Afghans do take it seriously, they have instituted a series of measures, but obviously they have some ways to go to make them fully effective. But you keep reminding yourself given the level of interactions, and numbers of embedded advisers we've got countrywide, this is a mercifully rare phenomenon. Even one is too many -- I go to the ramp ceremonies -- but I do think the Afghans are serious about getting it under control. We've taking some measures of our own. We've just got to keep after it.

HP: But it's also hard to tell where these attacks are coming from: Are they terrorism, are they signs of greater disaffection between the Afghan and Western militaries? There seems to be very little information.

RC: Because it's hard to figure out. Because normally in the green-on-blues the attacker winds up dead, so he doesn't get to answer too many questions. But I would imagine in a certain number of these cases it becomes personal. Hurt pride. With dead attackers, if he hasn't confided with his buddies, and very few of them seem to, it's very difficult to know.

HP: Are you hearing a lot of questions from visiting congressmen about this issue? What's your message to them about the problem?

RC: It is something we discuss with many of our congressional visitors. It has not been, to this point, an absolutely top-tier issue.

HP: Let's talk about Pakistan. There are a lot of calls in Kabul for the U.S. to take a tougher tack with the Pakistanis, but given our relationship with them, and their nuclear capabilities, are we at the limit of what we can actually say and do?

RC: Pakistan represents a challenge and it faces challenges. Thousands of Pakistanis have been killed by terrorist groups that are based there. We've got to stay engaged with them. We're not going to invade them. We'll try to work with them towards some understandings that the groups that are hurting the Afghans are hurting us, are hurting them even worse.

HP: Surely they know that though, right? So what else is motivating them?

RC: Well here's the thing. These groups have now become so formidable, and Pakistani military doctrine is still aimed at fighting tank battles on the plains of the Punjab, not a counterinsurgency, so they get chewed up pretty bad when they try and take them on. So there is that problem.

And then there is the old issue of hedging of bets. What I heard over and over [Crocker served as ambassador to Pakistan from 2004-2007] is, "Oh, you're back. Military assistance , economic assistance, that's nice. When are you leaving again? And do you plan on sanctions, like last time?"

Now I am hopeful that the partnership agreement with Afghanistan is going to get some serious attention in Pakistan. Because it's totally non-confrontational, but it means, Hey, if we're committed here through 2024, that means we're not leaving. That means maybe supporting some of these groups that are biting us isn't such a good idea after all.

We just have to work our way through this. But I do have to say, I find it more than annoying when Pakistan-based, Pakistan-backed groups attack my embassy. That really makes me mad.

Also on HuffPost: