The most successful attempt at imposing the caste system was made in the 19th century by Jung Bahadur Kunwar who was very keen to have his own status raised. He became the first of the Ranas and his task was to establish the legitimacy of Ranas and secure his control over the land. He succeeded in introducing the caste system to a much greater degree and rigidity than Jayasthitimalla, the Malla king had done just over five hundred years before him. With the advent of Khas domination since Nepal's unification by Prithvi Narayan Shah in 1769 A.D. the center of power shifted from the Newar noble families to these power and land hungry rural nobility whose core values were concentration of power at home and conquest abroad.