Terra Mariana (Medieval Latin for 'Land of Mary') was the formal name for Medieval Livonia or Old Livonia. It was formed in the aftermath of the Livonian Crusade, and its territories were composed of present-day Estonia and Latvia. It was established on 2 February 1207, as a principality of the Holy Roman Empire, and lost this status in 1215 when Pope Innocent III proclaimed it as directly subject to the Holy See.
The papal legate William of Modena divided Terra Mariana into feudal principalities: the Duchy of Estonia (dominum directum to the king of Denmark); the Archbishopric of Riga; the Bishopric of Courland; the Bishopric of Dorpat; the Bishopric of Ösel–Wiek; and territories under the military administration of the Livonian Brothers of the Sword. After the 1236 Battle of Saule, the surviving members of the Brothers merged in 1237 with the Teutonic Order of Prussia and became known as the Livonian Order. In 1346 the Livonian Order bought the Duchy of Estonia from Denmark.