By Alastair Leithead and Charles Haviland
BBC News, Kabul
Lord Ashdown had the right track record, but not Mr Karzai's blessing
The deal was done, or so it seemed. The UK's Paddy Ashdown had agreed to take on what he'd suggested was an impossible task as "super-envoy" to Afghanistan, but, at the last minute, it all fell apart.
It was the Afghan President Hamid Karzai and his government who blocked the appointment when all appeared settled.
Now the process to find a new head for the United Nations Assistance Mission to Afghanistan has to begin again and the international efforts here will be without strong direction for the foreseeable future.
The feeling among the international community in Kabul is that it's a missed opportunity - a powerful character with a proven track-record who could unite the aid effort in a way most say is crucial.
But perhaps Lord Ashdown, who served as the UN's High Representative and EU envoy to Bosnia from 2002 to 2005, was just too strong a character in a place where the international influence is being perceived as strengthening with time, rather than giving way to the new Afghan institutions.
President Karzai would not admit to feeling threatened by Paddy Ashdown - the two men met in Kuwait at the end of last year and the president was satisfied they could do business together.
But there was a sudden and unexpected change of heart - ministers had been worried he could come here as a 'Viceroy' with too much power, but that seemed to have been resolved.
The two issues surrounding his appointment were his personality and the terms of reference for his job.
Simply being headlined as a "super-envoy" was enough to suggest greater powers than his predecessor.
He would have had the same title, the UN Secretary-General's Special Representative, and would not have "worn two hats - the other being Nato's International Security Assistance Force civilian representative, a job which remains vacant.
But there was an understanding he would have more sway with Nato and in European capitals, and that was perhaps too much for the Afghan decision makers to handle.
The fact he was seen as an Anglo-American appointee may also have played against him.
There are more than 37 nations signed up to backing Afghanistan, but not all supported his candidacy.
The critical voices inside the government swung from rejecting a colonial-style leader, to opposing a non-Muslim with too much association with the West.
Some Afghan newspapers were critical of the Ashdown proposal
The fact he is British, at a time when relations between the UK and the Afghan government are going through one of their periodic rough patches, could also have had an impact.
And the media seems to have played an important role, and may well have sparked doubts in President Karzai's mind.
The Reuters agency leaked, by a source in Brussels, news that Ban Ki-Moon had approved his position, something that without proper consultation may have offended the Afghan government.
Then a leader article in the Times newspaper suggested the Afghan president would now just have to accept the decision.
President Karzai reads a lot of newspapers and is known to react strongly, sometimes angrily, to the way he and his country are reported.
This may have been the key that let doubting advisers get his ear and persuade the president that Paddy Ashdown would command too much power.
The Afghan foreign minister, Rangin Dadfar Spanta, told a press conference that Lord Ashdown was known to be "very controversial" and even "authoritarian", according to other unspecified foreign ministers.
But Mr Spanta revealed a lot about the Afghan government's fears over a threat to its sovereignty when he stressed the importance of "standing on our own two feet".
Where to now?
Government-controlled Afghan media did feature articles critical of the proposed new envoy, but the question is whether they were the true voice of the people, or whether they were reacting to government views.
So where from here?
The name General John McColl has been mentioned by the Afghan government, perhaps as a foil to suggestions they were opposed to a British appointee.
He has served here before and got on well with the president, but as a military four-star general - already working for Nato - it's unlikely the UN would accept his candidacy to take the civilian lead.
There are other names in the hat, but it's likely the international community may want to approach other people to do the job with the strength of character, proven track record and who would be broadly accepted by all sides: all qualifications Lord Ashdown was said to have had.