It is first mentioned in 1443 when Livonian Order ordered the erection of the fortress on the ancient mound, which was to serve as an Order border fortress on the border with competing Grand Duchy of Lithuania.