In 623 – according to the Chronicle of Fredegar – the Slavic tribes revolted against the oppression of the Avars. During this time, the Frankish merchant Samo allegedly came to the Czech lands with his entourage and joined with the Slavs to defeat the Avars. Thus the Slavs adopted Samo as their ruler. Later Samo and the Slavs came into conflict with the Frankish empire whose ruler Dagobert I wanted to extend his rule to the east. That led to the Battle of Wogastisburg in 631, in which the newly established Realm of Samo successfully defended its autonomy. The realm disintegrated after Samo's death.