Nepal began to experience some successes in international affairs during the tenure of Jung Bahadur. To the north, relations with Tibet had been mediated through China since Nepal's defeat in 1792, and during the early nineteenth century, embassies had to make the arduous journey to Beijing every five years with local products as a tribute to the Qing Emperor. By 1854, however, China was in decline and had fallen into a protracted period of disturbances, including the Taiping Rebellion (1851–64), revolts by Muslim ethnic groups north of Tibet and war with European powers. The Nepalese mission to Beijing in 1852, just after the death of the sixth Panchen Lama, was allegedly mistreated in Tibet. Because of this slight, the Nepalese government sent a protest letter to Beijing and Lhasa outlining several grievances, including excessive customs duties on Nepalese trade. In 1855 Nepalese troops overran the Kuti and Kairang areas. The Nepalese-Tibetan War lasted for about a year, with successes and failures on both sides, until a treaty negotiated by the Chinese resident and ratified in March 1856 gave Nepalese merchants duty-free trade privileges, forced Tibet to pay an annual tribute of 10,000 rupees to Nepal, and allowed a Nepalese resident in Lhasa. In return, Nepal gave up territorial gains and agreed that it, as well as Tibet, would remain a tributary state subject to China. As the Qing Empire disintegrated later in the century, this tributary status was allowed to lapse, and even Tibet began to shake off its subordination.
His mother Ganesh Kumari was the daughter of Kaji Nain Singh Thapa, brother of PM Bhimsen Thapa of then ruling Thapa dynasty. Through the influence of his maternal side, he enjoyed privileges. During his lifetime, he eliminated the factional fighting at the court, removed his family rivals such as Pandes and Basnyats and paved way for the finding of Rana Dynasty, introduced innovations into the bureaucracy and the judiciary, and made efforts to "modernize" Nepal. He remains one of the most important figures in Nepalese history, though modern historians have also blamed Jung Bahadur for setting up the dictatorship that repressed the nation for 104 years from 1846 to 1951 and left it in a primitive economic condition. Others exclusively blame his nephews, the Shumsher Ranas, for Nepal's dark period of history. Rana rule was marked by tyranny, debauchery, economic exploitation and religious persecution just as present day Nepal.
By 1850 Jung Bahadur had eliminated all of his major rivals, installed his own candidate on the throne, appointed his brothers and cronies to all the important posts, and ensured that major administrative decisions were made by himself as prime minister. At this point, he took the unprecedented step of traveling to Britain, France and Egypt leaving from Calcutta in April 1850 and returning to Kathmandu in February 1851. Although he unsuccessfully tried to deal directly with the British government while he was there, the main result of the tour was a great increase in goodwill between the British and Nepal. Recognizing the power of industrialized Europe, he became convinced that close co-operation with the British was the best way to guarantee Nepal's independence.
In 1858 King Surendra bestowed upon Jung Bahadur Kunwar the honorific title of Rana, an old title denoting martial glory used by Rajput princes in northern India. He then became Jung Bahadur Rana, and the later prime ministers descended from his family added his name to their own in honour of his accomplishments. Their line became known as the house of the Ranas. Jung Bahadur remained prime minister until 1877, suppressing conspiracies and local revolts and enjoying the fruits of his early successes. He exercised almost unlimited power over internal affairs, taking for his own use whatever funds were available in the treasury. He lived in the high style of an Anglicised native Prince in the British Raj, although unlike the Indian princes he was the ruler of a truly independent nation, an ally rather than a subordinate of the British.
Begum Hazrat Mahal took refuge in Kathmandu with her 10-year-old son in 1859 Birjis Qadr and some other loyal staff. The then Prime Minister of Nepal, Jung Bahadur Rana, gave her shelter at the palace in Thapathali (which now houses an office of the Nepal Rastra Bank, Thapathali Durbar), said Samim Miya Ansari. Jung Bahadur Rana took the step despite being in good terms with the British at the time.