The shooting deaths of two US military advisers in the Afghan capital and the quick decision to pull coalition personnel from all government ministries injected a sobering measure of doubt about the reliability of the most important US ally in the war.