Answer
Thapa helped Rana Bahadur Shah return to power, leading to his rise. Thapa was a strong supporter of Rana Bahadur Shah, and helped him to overthrow his uncle, Girvan Yuddha Bikram Shah, in 1799. After Rana Bahadur Shah was restored to power, Thapa was appointed as the Prime Minister of Nepal, a position he held for over 30 years.