It must have been difficult for President Barack Obama to fire General Stanley McChrystal as commander of US and Nato forces in Afghan-istan over his remarks reported in Rolling Stone magazine. Obama would have been criticised for whatever decision he took, but on balance he probably did the right thing in a very difficult situation.

General McChrystal was popular with both the Afghan government and his Nato counterparts, and understood the importance of winning over Afghan public opinion in this war. He was also a high-regarded soldier who shaped the President's counter-insurgency strategy in Afghanistan soon after Obama took office. McChrystal's departure, therefore, is a great loss.

On can understand the frustration surrounding McChrystal and his soldiers in Afghanistan where there are no easy solutions and where Nato casualties are mounting by the day. US and other forces are working in a very difficult environment and they must sometimes feel their politicians back home don't fully appreciate this state of affairs and often send out conflicting signals about how the war should be managed.

McChrystal's comments must be seen in this context, but are nevertheless still inexcusable. Disdain for the civilian command of the military, in particular the Presidency, is not acceptable, at least not in public, especially when the country is at war. Furthermore, the general's interview gave the impression of huge divisions within the Obama administration over Afghanistan, which is bad news and which is music to the ears of the Taliban.

Some might argue that the general was simply being naive when he spoke to the press. However, this is not the first time McChrystal has spoken out of turn to the media and had already been told off by the President for this, so he should have known better. As commander of US forces in Afghanistan, he was also a key political figure, and should have been much more careful with his choice of words.

The Rolling Stone article quotes General McChrystal as saying he felt "betrayed" by the US Ambassador to Afghanistan, Karl Eikenberry, who last year argued against troop increases.

The article also suggests that McChrystal was dismissive when he received a message from special envoy Richard Holbrooke and had a "special scepticism" for him. "Oh, not another e-mail from Holbrooke. I don't even want to open it," the General is reported to have said.

The magazine article depicts the general's staff discussing the prospect of being questioned by Vice-President Joe Biden, and McChrystal laughing as he says: "Are you asking about Vice-President Biden? Who's that?"

It also published quotes from unnamed aides of the general, including one advisor who said McChrystal was disappointed after his first meeting with the President, and another who dismisses General James Jones, Obama's national security advisor, as a "clown" who is "stuck in 1985".

Obama has now appointed General David Petraeus, who was responsible for the troop 'surge' in Iraq, as McChrystal's successor, and the President is lucky to have such an experienced soldier as a replacement.

Hopefully, Petreaus, who is regarded as a safe pair of hands, will continue along the same path as his predecessor and should keep US Afghan policy on track. He will also need to be careful about what he says to the press.

However, it is important for the US administration to try to understand what led General McChrystal to speak the way he did.

The appointment of General Petraeus does not mean the reasons for McChrystal's irritation at Washington have gone away, even if the new commander is more diplomatic in expressing his opinions. It seems the administration in Washington is not united over its Afghan strategy and is unclear, for example, about whether or how there should be negotiations with the Taliban.

Last Monday, for example, such indecision by the US over negotiating with the Taliban is being blamed for the sudden departure of Sir Sherard Cowper-Coles, Britain's special envoy to Afghanistan - who has been placed on extended leave - and who is said to have expressed serious doubts about US strategy in private discussions during a recent meeting in London.

Sir Sherard's main message is that the Taliban and other insurgents have to be part of the solution to the war in Afghanistan, and the sooner negotiations start with them the better.

General Petraeus now has a challenging task ahead of him and he certainly has the right credentials. As commanding general of the multinational force in Iraq from 2007 and 2008, he is widely credited with having led the successful surge that paved the way for some progress and greater stability. Furthermore, as commander of the US Central Command, he has been in the chain of command between General McChrystal and the White House for US operations in Afghanistan.

Petraus' challenges include reducing Nato casualties - June was one of the worst months in the nine-year war; gaining the confidence of the Afghan people; reducing Afghan civilian casualties; getting better military results in Helmand and Kandahar provinces; and improving the ability of the Afghan security forces to gradually replace Nato forces. A tall order indeed.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.