As the summer came on there were everywhere signs of unrest. In April the Ghilzyes cut the communications near Candahar, but were defeated by a small body of troops sent from that city. The Beloochees, whose country had been annexed, were bitterly hostile, and convoys were cut off. Candahar was invested by them, Quettah besieged, and Khelat captured. With the exception of Macnaghten himself, there was scarcely an officer in the army but was conscious of the tempest that was gathering round them. Shah Soojah was as unpopular among them as among the native population. Macnaghten was almost as unpopular as the Shah. Everyone knew that it was his influence that had first induced Lord Auckland to enter upon this war, and the levity with which he replied to every warning, and the manner in which he deferred to Shah Soojah in every respect, and allowed him to drive the tribesmen to despair by the greed of the tax-gatherers, incensed the officers of the army to the utmost.

In the spring the little garrison of Bamian were on the point of being reinforced by a Sepoy battalion when Dr. Lord, who had been sent as political officer, received information that led him to believe that Jubbar Khan, one of Dost Mahomed's brothers, who was in charge of Dost's family at Khooloom, was ready to come in. One of his sons had already done so, and Lord thought that by sending forward a force to the fortress of Badjah he would quicken Jubbar Khan's movements. It had the desired effect, and Jubbar Khan came into Bamian bringing with him Dost Mahomed's family and a large party of retainers. This, however, in no way improved the position of the little party at Badjah, for the natives in the vicinity exhibited the greatest hostility. The officer in command sent a detachment under Sergeant Douglas to escort another officer to Badjah. The party was, however, attacked, and although they made a gallant resistance, they would have been destroyed had not two companies of Ghoorkas arrived on the spot and beat off the enemy.

In August the startling news arrived that Dost Mahomed had escaped from Bokhara. He was received with open arms by the governor of Khooloom and a large force speedily gathered round him. Early in September he advanced upon Bamian with eight thousand men. Badjah was attacked, and although the Ghoorka regiment kept back the assailants, it was evident that so advanced a post could not be held, and the force retreated, leaving all their baggage behind them. A regiment of Afghan infantry had been raised and were stationed at Bamian, but on hearing of Dost Mahomed's approach they deserted to a man, most of them joining the enemy. Even Macnaghten could no longer shut his eyes to the serious nature of the position. Cabul was full of Sikh emissaries, who were stirring up the population to revolt, promising them that the Sikh nation would join in driving out the infidel. Reinforcements under Colonel Dennie reached Bamian on the 14th of September, and on the 17th Dost Mahomed with his army approached the place. Ignorant that the whole force was upon him, Dennie sent Mackenzie with two guns and four companies of native infantry and some four hundred Afghan horse, and himself followed with four more companies in support.

On joining the advanced party, he found that the whole of Dost Mahomed's force was in front of him. In spite of the enormous disparity of numbers, he determined to attack; a wise resolution, for although in our Indian wars the natives often fought bravely when they attacked us, they seldom offered a vigorous opposition when we took the offensive. Mackenzie's two guns opened fire with shrapnel, which had a terrible effect upon the dense masses of the enemy. These were unable to withstand the fire, and soon began to fall back. Mackenzie followed them, and again opened fire. Before long, Dost Mahomed's levies broke and fled; and Dennie launched the Afghan horsemen in pursuit. These cut down great numbers of the enemy, and dispersed them in all directions. The effect of this signal defeat was at once apparent. The Governor of Khooloom entered into negotiations without delay, and pledged himself not to harbour or assist Dost Mahomed; the country south of Khooloom was divided, he taking half, while the southern portion came under the authority of Shah Soojah.

The victory caused great satisfaction in Cabul, but this feeling was short-lived. Dost Mahomed after his defeat went to Kohistan, where there was great discontent among the chiefs, some of whom were already in revolt. General Sale sent a force from Jellalabad, which attacked a fortified position held by them, but the assault was repulsed with heavy loss. It was about to be renewed, when the Kohistanees evacuated the fort and fled. The fact, however, that our troops had met with a repulse had a great effect upon the minds of the natives. For the first time the Afghans had successfully withstood an attack by British soldiers.

Throughout the month of October Dost Mahomed was busy, and at one time approached within forty miles of Cabul, when guns were hastily mounted on the citadel to overawe the town, and orders sent to the force at Bamian to return at once. Dost, however, moved no nearer. Sir Robert Sale was pursuing him, and it was not until the 27th that he moved down again towards Cabul, and on the 29th the greater part of the force there marched out to give him battle.

On the 2nd of November the two armies came face to face in the valley of Purwandurrah. The Ameer at once moved from the village to the neighbouring heights, and the British cavalry galloped to outflank the Afghan horse. These were comparatively few in number, but headed by Dost Mahomed himself, they advanced steadily to meet the Indian cavalry. Gallantly as Indian troops have fought on numberless fields, on this occasion they disgraced themselves utterly. Turning rein as the Afghans approached, they galloped away in headlong flight, pursued by the Afghans until within range of the British guns. Their officers in vain attempted to arrest their flight, charging alone into the midst of the enemy. Two of them were killed when surrounded by enemies, Dr. Lord was shot, and the other two cut their way through their assailants and reached the British line covered with wounds. No more disgraceful affair has taken place in the story of our wars in India than this rout of Indian cavalry by a third of their number of wild horsemen.

But even yet the affair might have been retrieved had an officer like Dennie been in command; had the guns opened and the infantry advanced it might still have been a repetition of the victory of Bamian. But Sir A. Burnes was in authority, and, easily discouraged, as was his nature, he gave no orders, but sent off word to Macnaghten that there was nothing for it but to fall back to Cabul. Suddenly, however, the position was changed by Dost Mahomed himself. As he rode back after the victorious charge he thought over his position. His imprisonment at Bokhara had not broken his spirit, but it had affected him by showing him that the Mohammedans of Central Asia could not be trusted to work together or to unite to beat back the ever-advancing wave of infidel aggression by the British on the south, and the Russians on the west. But more than this, the defection of his brother at Khooloom, and the surrender by him of his family, had convinced him that it would be vain for him to continue to struggle to regain the throne that he had lost. The Kohistanees had risen before he joined them, and he had the satisfaction of showing that his bravery was in no way shaken by his misfortune, and of gaining a success of a most striking description. Now at least he could lay down his sword with honour. Accordingly, without telling anyone of his intention, he rode off the field with a single attendant, and on the following day reached Cabul and rode to the British Embassy.

As he approached it he saw Macnaghten returning from his evening ride. His attendant galloped forward and asked if the gentleman was the British envoy, and on Macnaghten saying that he was so, he then returned to his master; and Dost Mahomed riding forward, dismounted, saluted the envoy, and handed him his sword, saying that he had come to surrender and to place himself under his protection. Macnaghten returned it to him, and told him to remount, and they rode together into the residency, Dost Mahomed asking eagerly for news of his family, of whom he had not heard since their surrender. Being assured that they were well and were honourably treated, he was greatly relieved. A tent was pitched for him, and he wrote at once to his son, begging him to follow his example. He conversed freely with Macnaghten, gave him the history of his wanderings and adventures, and assured him that there was no occasion to place a guard over him, as his mind had quite been made up before he came in, and nothing short of force would compel him to leave. His only anxiety was that he should not be sent to England, and on Macnaghten assuring him that this would not be the case, and that an ample maintenance would be assigned to him in India, he became perfectly contented and calm.

As a result of his letter, three days later his eldest son, Mahomed Afzul, came into camp and surrendered. Dost remained two days at Cabul, where he was visited by many of the British officers, all of whom were impressed most strongly by him, comparing him very favourably with the man for whom we had dethroned him. Macnaghten wrote most warmly in his favour to the Governor-general, urging that he should be received with honour and a handsome pension assigned to him. He was sent down to India with a strong escort, where he was kindly received by the Viceroy, who settled upon him a pension of two lacs of rupees, equivalent to £20,000.