Мешко II
Around 981–990, the Polish prince Mieszko I took the Moravian Gate and Olomouc as an important place at the intersection of trade routes. Olomouc probably was mentioned in the Dagome iudex document (ca 991) as "Alemura". All of Moravia was part of Poland between 1003 and 1031 during the reign of Bolesław I the Brave and partly Mieszko II Lambert. The first certain mention of the city dates back to 1017. Moravia was under Bohemian rule since 1031 (according to some Czech historians, since 1019 or 1021).