Before Nepal's emergence as a nation in the latter half of the 18th century, the designation 'Nepal' was largely applied only to the Kathmandu Valley. Therefore up until the unification of the country, Nepal's history is largely the history of the Kathmandu Valley.
The first documented ruling dynasty of Nepal is around 250 AD though history of this area dates back to BC period as well. After the Lichavi and Malla dynasty the Shah dynasty unified Nepal in the eighteenth century. The modern nation of Nepal only came into existence in the late 18th century when Prithvi Narayan Shah, ruler of a petty principality called Gorkha unified the myriad little hill states of the central Himalaya to form his Kingdom. But the prize of course was the powerful and rich valley of Nepal – what today we call Kathmandu – with its trade, wealth, agriculture and productive population.