Medieval history of Nepal
In the 11th century, a powerful empire of Khas people emerged in western Nepal whose territory at its highest peak included much of western Nepal as well as parts of western Tibet and Uttarakhand of India. By the 14th century, the empire had splintered into loosely associated Baise rajyas, literally 22 states as they were counted.
Source: Wikipedia — Medieval history of Nepal (CC BY-SA 4.0)