Fellin (mod. Viljandi, Estonia) was a castle with an adjoining small town in Livonia, constructed on the site of an Estonian hill fort. It was located at the point where the medieval waterway from Pernau (mod. Parnu) via Dorpat (mod. Tartu) to Pskov was crossed by the road from north to south.
First besieged by the crusaders in 1211, during the subjection of the province of Sakkala (1217), Fellin developed into a center of crusader power, with improved fortifications and a church. The castle was briefly taken by an Estonian uprising, but was finally subjected to the Order of the Sword Brethren in 1223. Fellin later became a commandery of the Teutonic Order. It was regarded as one of the best-equipped and strongest castles in Livonia and housed the treasury of the Livonian branch of the order. In 1560 Fellin was conquered by Muscovite troops. In the following wars between Sweden, Poland, and Muscovy, the castle was ruined, and it lost its military importance by the beginning of the seventeenth century.