Ochterlony was withdrawn from the west and placed in command of the main force destined to march on Khátmándu. The Gúrkha government sued for peace, and a treaty was negotiated, which was signed on 28 Nov., and ratified by the supreme government at Calcutta on 9 Dec. 1815. The Gúrkha government, however, refused to ratify, and Ochterlony was ordered to take the field. He had with him twenty thousand men (including three European regiments), which he divided into four brigades: one on the right was directed on Hariharpur, another on the left up the Gandak to Rámnagur, while the other two brigades, forming the main body, Ochterlony himself commanded and directed upon the capital, Khátmándu.
Ochterlony advanced in the beginning of February. On the 10th, with the main body, he reached the entrance of the celebrated Kourea Ghât pass, having traversed the great Sal forest without the loss of a man. Finding the enemy entrenched behind a triple line of defence, he determined to turn the flank of the position, which was too strong for a front attack, and, taking with him a brigade without any baggage or incumbrances, he proceeded on the night of 14 Feb. up an unguarded path, moving laboriously in single file through deep and rocky defiles, across sombre and tangled forests, and by rugged and precipitous ascents, until the next day he reached and occupied a position in rear of the enemy's defences. The Gúrkhas, surprised and almost surrounded, were compelled hurriedly to evacuate their works. They fled northwards without striking a blow. Ochterlony's brigade was obliged to bivouac on the bleak mountain-tops for four days, waiting for the arrival of their tents and baggage. Ochterlony shared with his men the hardships of the campaign. The two brigades of his main column formed a junction on the banks of the Rapti river. Having established a depôt, protected with a stockade, Ochterlony came up with the enemy at Magwampur, twenty miles from Khátmándu, and seized a village to the right of the enemy's position. The Gúrkhas attacked the village occupied by Ochterlony furiously, but they were repulsed with the loss of their guns and eight hundred men. Ochterlony then prepared to attack Magwampur. The following day he was joined by the left brigade which had advanced by Rámnagur. It reached the valley of the Rapti with but slight opposition, and managed to secure its rear as it advanced. The right brigade had been delayed in its advance upon Hariharpur by the difficulties of the ground, but on 1 March the position at Hariharpur was successfully turned, and an attack by the Gúrkhas was defeated with great loss. Hariharpur was evacuated by the enemy, and converted into a depôt. This brigade was about to advance to join Ochterlony when the war ended. The success and energy of Ochterlony's operations had dismayed the court of Nípál. The treaty, which they had refused to ratify in December, was sent duly ratified to Ochterlony, who accepted it, on 2 March 1816. The Gúrkhas, who were not only the most valiant but the most humane foes the British had encountered in India, proved also to be most faithful to their engagement.
For his later services in this war, Ochterlony was made a G.C.B. in December 1816. On 14 Jan. 1817 the prince-regent granted, as a further mark of distinction, an augmentation to his coat of arms, by which the name of Nepaul (Nípál) was commemorated. On 6 Feb. the thanks of parliament were voted to him for his skill, valour, and perseverance in the war. A piece of plate was presented to him by the officers who served under his command.
Towards the close of 1816 Lord Hastings, with the approval of the authorities in England, determined to suppress the Pindárís who had been laying waste British territory, and also to place Central India on a more satisfactory footing by subjugating the Maráthá chiefs. For this purpose, in the autumn of 1817 he assembled six corps—one under himself at Mirzápur, another on the Jamna, the third at Agra, the fourth at Kálinjar in Bandalkhand, the fifth in the Narbadá, and the sixth under Ochterlony at Rewári, to cover Delhi and to act in Rájputána. The total army amounted to 120,000 men and three hundred guns. Ochterlony had to act in the Dakhan, and from Rewári advanced to the south of Jaipur. The successes at Púna and Nágpur, and the position of Amír Khán between Ochterlony and the third corps on the Chambal, brought about an amicable settlement with Amír Khán, and a treaty was made with him on 19 Dec. Thenceforward Amír Khán proved a peaceable ally, and the Pindárís lost his support just when they most required it. Ochterlony remained in the vicinity, and, placing himself skilfully between the two principal divisions of the Pathán forces, he effected the disarmament of the greater portion of this army in January and February 1818 without striking a blow. The artillery was surrendered, and some of the best troops were drafted temporarily into the British service. The last body of these mercenaries was disbanded in March. Affairs in