nadir khan, having raised a force in the khost district, starts an advance on kabul, but he is met by a kabuli force at baraki in the logar valley, and defeated, chiefly through the treachery of his ally, the amir of ghazni. at the end of may habibullah's troops occupy kandahar without opposition, and capture the amir ahmad ali, who is sent to kabul as a prisoner and executed there in july. after his defeat, nadir khan is left utterly without resources; nevertheless he remains habibullah's most formidable opponent on account of his influence with the tribes and the loyal cooperation of his brothers. habibullah now tries to conciliate him and proposes a conference. nadir khan stipulates that he shall first resign the throne, but to this he does not consent.