king. In Kathmandu, Bhimsen took up residence at Thapathali, after which he lived in Bagh Durbar near Tundikhel after becoming a Kaji (equivalent to a minister). Rise to power: 1798–1804 Royal household The premature death of Pratap Singh Shah (reigned 1775–77), the eldest son of Prithvi Narayan Shah, left a huge power vacuum that remained unfilled, seriously debilitating the emerging Nepalese state. Pratap Singh Shah's successor was his son, Rana Bahadur Shah (reigned 1777–99), aged two and one-half years at his accession. The acting regent until 1785 was Queen Rajendra Lakshmi, followed by Bahadur Shah (reigned 1785–94), the second son of Prithvi Narayan Shah. Court life was consumed by rivalry centered on alignments with these two regents rather than on issues of national administration, and it set a bad precedent for future competition among contending regents. The exigencies of Sino-Nepalese War in 1788–92 had forced Bahadur Shah to temporarily take a pro-British stance, which had led to a commercial treaty with the British in 1792. Meanwhile, Rana Bahadur Shah's youth had been spent in pampered luxury. In 1794 Rana Bahadur came of age, and his first act was to re-constitute the government, with his uncle, Bahadur Shah, removed from all official position. In mid-1795, he became infatuated with a Maithili Brahman widow, Kantavati Jha, and married her on the oath of making their illegitimate half-caste son (as per the Hindu law of that time) the heir apparent, by excluding the legitimate heir from his previous marriage. By 1797, his relationship with his uncle, who was living a retired life, and who wanted to seek refuge in China on the pretext of meeting the new emperor, had deteriorated to the extent that he ordered his imprisonment on 19 February 1797 and his subsequent murder on 23 June 1797. Such acts earned Rana Bahadur notoriety both among courtiers and common people, especially among Brahmins. That same year in 1797, Girvan Yuddha Bikram Shah was born and was hastily declared the crown prince. However, within a year of Girvan's birth, Kantavati contracted tuberculosis; and it was advised by physicians that she perform ascetic penances to cure herself. To make sure that Girvan succeeded to the throne while Kantavati was still alive, Rana Bahadur, aged just 23, abdicated in favor of their son on 23 March 1799, placing his first wife, Rajrajeshwori, as the regent. He joined his ailing wife, Kantavati, with his second