The Hungarians occupied the region in 896 and expanded to the river Sava, but as the Principality of Hungary transformed to the Kingdom of Hungary, the borders with the Kingdom of Croatia were set along the river Drava. In 1102 Croatia entered a personal union with the Kingdom of Hungary. During 13th century tradesmen and merchants (mostly ethnic Germans) started to arrive and began to develop the urban localities that are present today. Prelog (Perlak) was founded in 1264, shortly after the invasion of the Mongols in 1242, and the other settlements followed. Later it was part of Zala County. In the beginning of the 14th century, the area was ruled by powerful semi-independent oligarch Henrik Kőszegi.