British Resident, Captain William O. Knox, who was reluctantly welcomed by the courtiers in Kathmandu on 16 April 1802. The primary objective of Knox's mission was to bring the trade treaty of 1792 into full effect and to establish a "controlling influence" in Nepali politics. Almost eight months after the establishment of the Residency, Rajrajeshwari finally managed to assume the regency on 17 December 1802. Return to Kathmandu After Rajrajeshwori took over the regency, she was pressured by Knox to pay the annual pension of 82,000 rupees to the ex-King as per the obligations of the treaty, which paid off the vast debt that Rana Bahadur Shah had accumulated in Varanasi due to his spendthrift habits. The Nepalese court also felt it prudent to keep Rana Bahadur in isolation in Nepal itself, rather than in the British controlled India, and that paying off Rana Bahadur's debts could facilitate his return at an opportune moment. Rajrajeshwari's presence in Kathmandu also stirred unrest among the courtiers that aligned themselves around her and Subarnaprabha. Sensing an imminent hostility, Knox aligned himself with Subarnaprabha and attempted to interfere with the internal politics of Nepal. Getting a wind of this matter, Rajrajeshwari dissolved the government and elected new ministers, with Damodar Pande as the Mulkaji, while the Resident Knox, finding himself persona non grata and the objectives of his mission frustrated, voluntarily left Kathmandu to reside in Makwanpur citing a cholera epidemic. Subarnaprabha and the members of her faction were arrested. Such open display of anti-British feelings and humiliation prompted the Governor General of the time Richard Wellesley to recall Knox to India and unilaterally suspend the diplomatic ties. The Treaty of 1801 was also unilaterally annulled by the British on 24 January 1804. The suspension of diplomatic ties also gave the Governor General a pretext to allow the ex-King Rana Bahadur to return to Nepal unconditionally. As soon as they received the news, Rana Bahadur and his group proceeded towards Kathmandu. Some troops were sent by Kathmandu Durbar to check their progress, but the troops changed their allegiance when they came face to face with the ex-King. Damodar Pande and his men were arrested at Thankot where they were waiting to greet the ex-King with state honors and take him into isolation. After Rana Bahadur's reinstatement to power, he started to extract vengeance on those who had tried to keep him in exile. He