 The castle was an important northern defence post against numerous incursions of the Livonian Order.Between 1353 and 1379 alone, it repelled ten such attacks.The castle was further expanded and fortified in the 15th century, when it served as the seat of the Starost of Upytė.