
In 1677, a new organization of the judiciary was introduced in the part of Livonia (the Duchy of Livonia) dependent on the Polish-Lithuanian Commonwealth. The land court (sąd ziemski) and castle court (sąd grodzki) established at that time were to function on the model of their Polish-Lithuanian counterparts. The Livonian castle court sat in the castle in Dyneburg, and its work was headed by the castle starost (starosta), who was subordinate to the castle substarost (podstarosta), the judge, and the notary. The chancellery was run by the regent. In 1765 two more judges were added. During the reign of Stanisław Augustus Poniatowski, the Castle Court held two sessions a year (in August and December). The legal basis of its jurisdiction was the III Statute of Lithuania, and any appeals against its decisions were submitted to the Crown Court. The judicial documents were written in Polish. In 1772 the Duchy of Livonia was annexed to the Russian Empire.