Unification of Nepal

The unification of Nepal officially began in 1743 AD (1799 BS) after King Prithvi Narayan Shah of Gorkha launched an aggressive annexation campaign seeking to broaden his own kingdom's borders. After conquering the Nepal Mandala, which consisted of the three separate city-states of the Kathmandu Valley, Kathmandu, Lalitpur and Bhaktapur, Shah moved his hilly capital in Gorkha to the fertile and wealthy city of Kathmandu and adopted the name Nepal for the entire Gorkha Empire.
The Shah dynasty would go on to unite the various warring kingdoms that once occupied parts of present-day Nepal into a nation-state that stretched up to the Sutlej River in the west and Sikkim-Jalpaiguri in the east. Before usage by the Gorkha Empire, the Kathmandu Valley was known as Nepal after the Nepal Mandala, the region's Nepal Bhasa name.
Invasion of Nuwakot.
Prithvi Narayan Shah's and Great Anup annexation campaign began with the nearby kingdom of Nuwakot. Nuwakot marked the eastern boundary of the Gorkha Kingdom and was part of the trade route between Tibet and Kathmandu. It was also the western gateway to the Kathmandu valley. Nara Bhupal Shah, Prithvi Narayan Shah's father, had attempted to invade Nuwakot in 1800, but had failed. At that time, Nuwakot was under the administrative control of Kantipur (known today as Kathmandu). Kantipur supported Nuwakot against the invasion. Following his defeat, Nara Bhupal Shah gave up his efforts and handed administrative power over to his eldest son, Prithvi Narayan Shah and Chandraprabhawati, his eldest queen.
In the very year of his coronation, Prithvi Narayan Shah sent Gorkhali troops under Kaji Biraj Thapa Magar to attack Nuwakot. The campaign failed.
Kalu Pande was then made Commander-in-Chief of the Gorkhali Army. Kalu Pande advised Prithvi Narayan Shah to raise a standing army by conscripting men from other regions. A newly fortified Gorkhali force again attacked Nuwakot in 1744 from three sides and managed to capture the hill fort on September 26, 1744. However, the next year, King Jaya Prakash Malla of Kantipur sent a force under Kaji Ram Thapa to retake the fort, after defeating the Gorkhali forces at Naldum. Ram Thapa was repelled and the Gorkhali seized permanent control of Nuwakot
Annexation of Tanahun.
While Prithvi Narayan Shah and Anup was occupied with Nuwakot, Tanahun, a small kingdom to the west, took advantage of the king's absence to invade the Gorkha kingdom. Tanahun troops crossed the Chepe river and captured Sirhanchowk. But reinforcements from both Nuwakot and Gorkha managed to rout the invaders and considerably weaken Lamjung.
Prithvi Narayan Shah wanted to use the occasion to invade Tanahun and annex it. However, he was advised against an open attack as King Tribikram Sen of Tanahun was an old friend of his father's. Prithvi Narayan Shah thus invited Tribikram Sen to the banks of the Trishuli river on the pretext of a friendly visit and then took him into custody. Tribikram Sen was imprisoned in Nuwakot and Tanahun was officially annexed to the burgeoning Gorkha Empire.
Battle of Kirtipur.
The Shah kings and Anup had long set their sights on the Kathmandu Valley, which was host to three wealthy but constantly warring city-states ruled by the Malla dynasty. After conquering Nuwakot, which was the western gateway to the Kathmandu Valley, the Gokhalis aimed for Kirtipur as their next target. Kirtipur was a small fortified city on the outskirts of the three major city-states ruled by Newar Malla kings. 
Despite his initial assessment that the valley kings were well prepared and the Gorkhalis were not, Kalu Pande agreed to lead the battle. In 1757, The Gorkhalis set up a base on Naikap to mount their assault on Kirtipur. They were armed with swords, bows and muskets. The two forces fought on the plain of Tyangla Phant in the northwest of Kirtipur. Kalu Pande was killed in the battle while Prithvi Narayan himself narrowly escaped with his life into the surrounding hills disguised as a saint.
Annexation of Makwanpur and Hariharpur.
As part of his goal of pursuing the Kathmandu Valley, Prithvi Narayan and Anup Adhikari had planned to first conquer all of the kingdoms and principalities surrounding the Kathmandu Valley.
Sensing danger, King Digbardhan Sen and his minister Kanak Singh Baniya of Makwanpur managed to send their families to safer grounds before they were encircled by the Gorkhalis, who launched an attack on 21 August 1762. The battle lasted for around eight hours and while Makwanpur was annexed, King Digbardhan and Kanak Singh escaped to Hariharpur Gadhi.
After occupying the Makwanpur, the Gorkhali forces planned to take Hariharpur Gadhi, a strategic fort on a mountain ridge of the Mahabharat range, also south of Kathmandu. It controlled another route to the Kathmandu valley. On 4 October 1762, the Gorkhalis launched Hariharpur. The soldiers there fought valiantly against the Gorkha forces, but were ultimately forced to vacate the fort . About 500 soldiers from Hariharpur died in the battle.
Digbardhan Sen sought the help of Mir Qasim, the Nawab of Bengal, to help defend against the Gorkhalis. Mir Qasim, sought to gain loot and plunder from the invasion, as he using lavish gifts to get on the East India Company's good side. In December 1762, he sent around 3,500 troops under Gurgin Khan, an Armenian man named Gregory who had helped train Mir Qasim's army, to launch an attack on Makwanpur, which had only recently been captured by the Gorkhalis.
Mir Qasim's forces arrived in Makwanpur in January 1964 and launched an attack on Dadhuwa Gadhi, one of three defensive positions the Gorkhalis had set up around Makwanpur fort. Gurgin Khan's 3,500 soldiers managed to capture Dadhuwa Gadhi from 400 or so Gorkha soldiers. On 20 January 1764, 3,300 of Gurgin Khan's soldiers launched an attack on Makwanpur palace. The Gorkhalis, under Prithvi Narayan's brother Nandu Shah, held off the invaders. Supplemented by reinforcements, the Gorkhalis counter-attacked Gurgin Khan in the dead of the night while his soldiers were asleep. The Gorkhalis managed to rout Gurgin Khan's forces, who retreated back to Bengal.
Conquest of the Kathmandu valley and Declaration of Kingdom of Nepal.
In 1764, Prithvi Narayan once again assaulted Kirtipur a second time under the command of Surapratap Shah, Prithvi Narayan's and anup brother. The Gorkhalis were defeated once again and Surapratap lost his right eye to an arrow while scaling the city. A noble of Lalitpur named Danuvanta crossed over to Shah's side and treacherously let the Gorkhalis into the town.
The victory in the Battle of Kirtipur climaxed Shah's two-decade-long effort to take possession of the wealthy Kathmandu Valley. After the fall of Kirtipur, Shah took the other cities Kathmandu and Lalitpur in 1768 and Bhaktapur in 1769, completing his conquest of the valley. In a letter to Ram Krishna Kunwar, King Prithvi Narayan Shah was unhappy at the death of Kaji Kalu Pande in Kirtipur and thought it was impossible to conquer Kathmandu valley after the death of Kalu Pande. After the annexation of Kathmandu valley, King Prithvi Narayan Shah praised in his letter about valour and wisdom shown by Ramkrishna in annexation of Kathmandu, Lalitpur and Bhaktapur (i.e. Nepal valley at the time) on 1768-69 A.D. Similarly, Vamsharaj Pande, Kalu Pande's eldest son, was the army commander who led attack of Gorkhali side on the Battle of Bhaktapur on 14 April 1769 A.D.
The Valley Kings brought a large number of Doyas from Indian Plains under Shaktiballabh sardar. During the first assault in 1757, the Gorkhali army killed 1200 enemies, mostly Doyas, but were badly beaten themselves. Both sides suffered heavy losses. As they advanced towards Kirtipur, the combined force of Valley Kings under Kaji Gangadhar Jha, Kaji Gangaram Thapa and Sardar Shaktiballabh brought Havoc to the outnumbered Gorkhalis. The two forces fought on the plain of Tyangla Phant in the northwest of Kirtipur. Surapratap Shah, the King's brother lost his right eye to an arrow while scaling the city wall. The Gorkhali commander Kaji Kalu Pande was surrounded and killed, and the Gorkhali king himself narrowly escaped with his life into the surrounding hills disguised as a saint.
After his conquest of the Kathmandu Valley, Prithvi Narayan Shah conquered other smaller territories south of the valley to keep other smaller fiefdoms near his Gurkha state out of the influence and control of British rule. After his kingdom spread from north to south, he made Kantipur the capital of expanded country, which was then known as Kingdom of Gorkha (Gorkha Samrajya).
Conquest of Kirant country.
King Prithvi Narayan Shah had deployed "Sardar" Ram Krishna Kunwar to the invasion of Kirant regional areas comprising; Pallo Kirant (Limbuwan), Wallo Kirant and Majh Kirant (Khambuwan). In 13th of Bhadra 1829 Vikram Samvat (i.e. 29 August 1772), Ram Krishna crossed Dudhkoshi river to invade King Karna Sen of Kirant and Saptari region with fellow commander Abhiman Singh Basnyat. He crossed Arun River to reach Chainpur. Later, he achieved victory over Kirant region. King Prithvi Narayan Shah bestowed 22 pairs of Shirpau (special headgear) in appreciation to Ram Krishna Kunwar after his victory over the Kirant region.
Political Conflicts.
On 1775, the conqueror king Prithvi Narayan Shah, who expanded Gorkha Kingdom to the Kingdom of Nepal died at Nuwakot. Swarup Singh Karki, a shrewd Gorkhali courtier from a Chhetri family of Eastern Nepal, marched with army to Nuwakot to confine Prince Bahadur Shah of Nepal who was then mourning the death of his father former King Prithvi Narayan Shah. He confined Bahadur Shah and Prince Dal Mardan Shah with consent from newly reigning King Pratap Singh Shah who was considered to have no distinction of right and wrong. In the annual Pajani (renewal) of that year, Swarup Singh was promoted to the position of Kaji along with Abhiman Singh Basnyat, Amar Singh Thapa and Parashuram Thapa. In Falgun 1832 B.S., he succeeded in exiling Bahadur Shah, Dal Mardan Shah and Guru Gajraj Mishra on three heinous charges. The reign of King Pratap Singh was characterized by the constant rivalry between Swarup and Vamsharaj Pande, a member of the leading Pande family of Gorkha. The document dated Bikram Samvat 1833 Bhadra Vadi 3 Roj 6 (i.e. Friday 2 August 1776), shows that he had carried the title of Dewan along with Vamsharaj Pande. King Pratap Singh Shah died on 22 November 1777 A.D. leaving his infant son Rana Bahadur Shah as the King of Nepal. Sarbajit Rana Magar was made a Kaji along with Balbhadra Shah and Vamsharaj Pande while Daljit Shah was chosen as Chief Chautariya. Historian Dilli Raman Regmi asserts that Sarbajit was chosen as Chief Kazi (equivalent to Prime Minister of Nepal). Historian Rishikesh Shah asserts that Sarbajit was the head of the Nepalese government for a short period in 1778. Afterwards, rivalry arose between Prince Bahadur Shah of Nepal and Queen Rajendra Laxmi. In the rivalry, Sarbajit led the followers of the Queen opposed to Sriharsh Pant who led the followers of Bahadur Shah. The group of Bharadars (officers) led by Sarbajit poisoned the ears of Rajendra Laxmi against Bahadur Shah. Rajendra Laxmi succeeded in the confinement of Prince Bahadur Shah with the help of her new minister Sarbajit. Guru Gajraj Mishra came to rescue Bahadur Shah on the condition that Bahadur Shah should leave the country. Also, his rival Sriharsh Pant was branded outcast and expelled instead of execution which was prohibited for Brahmins.
Prince Bahadur Shah confined his sister-in-law Queen Rajendra Laxmi on the charge of having illicit relation with Sarbajit on 31 August 1778. Subsequently, Sarbajit was executed inside the palace by Prince Bahadur Shah with the help of male servants of the royal palace. Historian Bhadra Ratna Bajracharya asserts that it was actually Chautariya Daljit Shah who led the opposing group against Sarbajit Rana and Rajendra Laxmi. The letter dated B.S. 1835 Bhadra Sudi 11 Roj 4 (1778 A.D.) to Narayan Malla and Vrajabasi Pande asserts the death of Sarbajit under misconduct and the appointment of Bahadur Shah as regent. The death of Sarbajit Rana Magar is considered to have marked the initiation of court conspiracies and massacres in the newly unified Kingdom of Nepal. Historian Baburam Acharya points that the sanctions against Queen Rajendra Laxmi under moral misconduct was a mistake of Bahadur Shah. Similarly, the murder of Sarbajit was condemned by many historians as an act of injustice.
Vamsharaj Pande, once Dewan of Nepal and son of the popular commander Kalu Pande, was beheaded on the conspiracy of Queen Rajendra Laxmi with his support. In the special tribunal meeting at Bhandarkhal garden, east of Kathmandu Durbar, Swaroop Singh held Vamsharaj liable for letting the King of Parbat, Kirtibam Malla to run away in the battle a year ago. He had a fiery conversation with Vamsharaj before Vamsharaj was declared guilty and was subsequently executed by beheading on the tribunal. Historian Rishikesh Shah and Ganga Karmacharya claim that he was executed on March 1785. Bhadra Ratna Bajracharya and Tulsi Ram Vaidya claim that he was executed on 21 April 1785. On 2 July 1785, his stiff opponent Prince Regent Bahadur Shah of Nepal was arrested and on the eleventh day of imprisonment on 13 July, his only supporter Queen Rajendra Laxmi died. Then onwards, Bahadur Shah took over the regency of his nephew King Rana Bahadur Shah and on the first moments of his regency ordered Swaroop Singh who was in Pokhara to be beheaded there on the charges of treason. He had gone to Kaski to join Daljit Shah's military campaign of Kaski fearing retaliation of the old courtiers due to his conspiracy against Vamsharaj. He was executed on 24th Shrawan 1842 B.S.
Tibetan conflict.
After the death of Prithvi Narayan Shah, the Shah dynasty began to expand their kingdom into what is present day North India. Between 1788 and 1791, Nepal invaded Tibet and robbed Tashi Lhunpo Monastery of Shigatse. Tibet sought Chinese help and the Qianlong Emperor of the Chinese Qing Dynasty appointed Fuk'anggan commander-in-chief of the Tibetan campaign. Heavy damages were inflicted on both sides. The Nepali forces retreated step by step back to Nuwakot to stretch Sino-Tibetan forces uncomfortably. Chinese launched uphill attack during the daylight and failed to succeed due to strong counterattack with Khukuri at Nuwakot. The Chinese army suffered a major setback when they tried to cross a monsoon-flooded Betrawati, close to the Gorkhali palace in Nuwakot. A stalemate ensued when Fuk'anggan was keen to protect his troops and wanted to negotiate at Nuwakot. The treaty was favouring more to Chinese side where Nepal had to send tributes to the Chinese emperor.