The Electorate of Trier ( or or Trèves) was an ecclesiastical principality of the Holy Roman Empire that existed from the end of the 9th to the early 19th century. It was the temporal possession of the prince-archbishop of Trier () who was, ex officio, a prince-elector of the empire. The other ecclesiastical electors were the electors of Cologne and Mainz. The capital of the electorate was Trier; from the 16th century onward, the main residence of the Elector was in Koblenz. The electorate was secularized in 1803 in the course of the German mediatisation. The Elector of Trier, in his capacity as archbishop, also administered the Archdiocese of Trier, whose territory did not correspond to the electorate (see map below). History Middle ages Trier, as the important Roman provincial capital of , had been the seat of a bishop since Roman times. It was raised to archiepiscopal status during the reign of Charlemagne, whose will mentions the bishoprics of Metz, Toul and Verdun as its suffragans. The bishops of Trier were already virtually independent territorial magnates during the Merovingian dynasty. In 772, Charlemagne granted Bishop Wiomad complete immunity from the jurisdiction of the ruling count for all the churches and monasteries, as well as villages and castles that belonged to the Church of St. Peter at Trier. In 816 Louis the Pious confirmed to Archbishop Hetto the privileges of protection and immunity granted by his father. At the partition of the Carolingian empire at Verdun in 843, Trier was given to Lothair; at the partition of Lotharingia at Mersen in 870, it became part of the East Frankish kingdom, which developed into the Kingdom of Germany. In 898, Archbishop Radbod received complete immunity from all taxes for the entire episcopal territory, granted by Zwentibold, who was the natural son of Emperor Arnulf of Carinthia, and who reigned briefly as King of Lotharingia. He was under great pressure from his independent nobles and desperately needed a powerful ally. The gift cemented the position of the archbishops as territorial lords in their own right. Following Zwentibold's assassination in 900, the handlers of the child-king Louis courted Radbod in their turn, granting him the district and city of Trier outright, permission to impose customs duties and the right to a mint (as much a symbol of independent authority as an economic tool). From the court of Charles the Simple, he obtained the