Complex sentence: The castle served as a base of the local Livonian order landlords until the 16th century and also as the main military support base for battles against Russians and Lithuanians.
Split into simpler sentences: The castle served as a base of the local Livonian order landlord until the 16th century. It was also the main military support base for battles with Russians and Lithuanians.