Cologne is the ancient Roman city of Colonia Agrippina and has been a bishop's see since Roman times. In 953, the archbishops of Cologne first gained noteworthy secular power, when bishop Bruno was appointed as duke by his brother Emperor Otto I. In order to weaken the secular nobility, who threatened his power, Otto endowed Bruno and his successors on the bishop's see with the prerogatives of secular princes. This was the beginning of the electoral state of Cologne. It was formed by the temporal possessions of the archbishopric and included in the end a strip of territory along the left Bank of the Rhine east of Jülich, as well as the Duchy of Westphalia on the other side of the Rhine, beyond Berg and Mark.
By the end of the 12th century, the right to elect the Holy Roman Emperor was limited to four secular and three ecclesiastical princes, among them the Archbishop of Cologne. Besides being prince elector, he was Archchancellor of Italy as well, technically from 1238 and permanently from 1263 until 1803. Following the Battle of Worringen in 1288, Cologne gained its independency from the archbishops and became a Free City. So the residence of the archbishop was moved to Bonn.
During the 16th century, no fewer than three Archbishops of Cologne converted to Protestantism. The first two, Hermann von Wied and Salentin von Isenburg-Grenzau, resigned the archbishopric on converting; but Gebhard Truchsess von Waldburg, on converting to Calvinism in 1582, attempted to secularize the archbishopric. This resulted in the Cologne War in which a Bavarian army installed the Bavarian prince Ernst as archbishop — the first major success of the Counter-Reformation in Germany. From then until the mid-18th century, the archbishopric was effectively a secundogeniture of the Wittelsbach rulers of Bavaria. As the archbishop in this period usually also held the Bishopric of Münster (and often the Bishopric of Liège), he was one of the most substantial princes of northwestern Germany.
After 1795, the electorate's territories on the left bank of the Rhine were occupied by France, and were formally annexed in 1801. The Reichsdeputationshauptschluss of 1803 secularized the rest of the archbishopric, giving the Duchy of Westphalia to the Landgraviate of Hesse-Darmstadt. Cologne was, however, reestablished as the seat of a Catholic archbishop in 1824, and is an archdiocese to the present day.