At this, the Gurkhas opened negotiations with Jonathan Duncan, Resident at Benares, in the time of Lord Cornwallis, and offered to grant valuable commercial privileges to the English if they rendered only military help in return. Lord Cornwallis agreed to the tempting proposals, and Colonel Kirkpatrick was appointed to bring about a peace between the Gurkhas and the Chinese. Before the Kirkpatrick Mission had much advanced in its purpose, the Gurkhas had concluded an independent treaty with the Chinese. Colonel Kirkpatrick pursued the new relations which the English thought they had securely established with the Gurkhas, and entered the Khatmandu Valley; but the Gurkhas evaded all his overtures and he had to quit Nepal in 1793 A.D.
In 1795 A.D. there was a revolution in Nepal. Ran Bahadur Shah removed his uncle from his absolute regency and himself assumed the reigns of Government. For the next five years Nepal was the scene of the most barbarous outrages perpetrated by the new King. Again there was a revolution ; the nobles and chiefs of Nepal were disgusted with the state of affairs, and they united together to drive out Ran Bahadur who had to abdicate in favour of his sop. The exiled King took shelter in British India. The English had once more an opportunity to interpose themselves in the affairs of Nepal. They undertook to intercede and obtain a suitable settlement or a pension for Ran Bahadur and were also anxious to secure for themselves the enforcement of the treaty of 1792 A.D. Captain Knox, who was in charge of these negotiations, entered Nepal in 1.801 A.D. and was on the point of success, when the Queen of the exiled. Ran Bahadur returned to Khatmandu, drove away the Regent by the aid of popular support, and took the young King and the administration under her own care. The Durbar now turned its attention towards Captain Knox; and Lord Cornwallis had to dissolve his alliance with Nepal, since he found that nothing would come out of it. The Raja, though restored to power through the bold venture of his wife, again made himself odious, and was killed in a dispute with his brother. Now Bhimsen Thappa, a brave and shrewd adherent of the Rani, assumed the direction of affairs.
No sooner were the internal affairs settled than was the Nepalese Government confronted with the claim of the British Government arising out of the Gurkha aggressions on the British frontier. A joint Commission was fixed upon, which gave its decision in favour of the British Government, and the British Police actually occupied the debatable territory. The Gurkhas did not like this; they attacked the British stations; and British remonstrances proving useless, war was , formally declared in November 1814 A.D. During the early conduct of the war, British troops were repeatedly defeated ; but in 1815 A.D. Sir David Ochterlony assumed the chief command of the campaign and turned the tide of affairs. Amar Singh, the brave Gurkha General, and his son were hemmed in, and, had to sign a capitulation. They were allowed to return to Khatmandu after conceding the whole of the territory west of the Kali. A treaty of peace was being concluded in 1815 A. D. when the Durbar, disapproving of Amar Singh's action, decided to carry on the war with greater vigour. The Gurkhas made a brave resistance, but fearing that further successes on the part of the English would mean eternal subjection, they agreed in March 1816 A.D. to ratify and sign the treaty of peace of the previous year. By this treaty, the Gurkhas gave up all their latest conquests including Kumaun and the tracts now comprising Dehradun, Almora, and Simla.
The young Raja died in 181 6 A.D. and was succeeded by his infant son, Rajendra Vikramshah, under the guardianship of the Minister, Bhimsen Thappa. For more than fifteen years the Darbar was ruled by alternate factions giving rise to frequent feuds and outrages, till the famous Jung Bahadur murdered his uncle Matabar Singh,