Another group, the Bamar people, entered the upper Irrawaddy valley in the early 9th century. They went on to establish the Pagan Kingdom (1044–1297), the first-ever unification of the Irrawaddy valley and its periphery. The Burmese language and Burma culture slowly came to replace Pyu norms during this period. After the First Mongol invasion of Burma in 1287, several small kingdoms, of which the Kingdom of Ava, the Hanthawaddy Kingdom, the Kingdom of Mrauk U and the Shan States were principal powers, came to dominate the landscape, replete with ever-shifting alliances and constant wars.