The Bohemian lands had been settled by Celts (Boii) from 5th BC until 2nd AD, then by various Germanic tribes (Marcomanni, Quadi, Lombards and others) until they moved on to the west during the Migration Period (1st-5th century). At the beginning of the 5th century the population decreased vigorously and, according to mythology led by a chieftain Čech, the first Western Slavs came in the second half of the 6th century. In the course of the decline of the Great Moravian realm during the Hungarian invasions of Europe in the 9th and 10th century, the Czech Přemyslid dynasty established the Duchy of Bohemia.