The capital of Germany is the city state of Berlin. It is the seat of the President of Germany, whose official residence is Schloss Bellevue. The Bundesrat ("federal council") is the representation of the Federal States (Bundesländer) of Germany and has its seat at the former Prussian Herrenhaus (House of Lords). Though most of the ministries are seated in Berlin, some of them, as well as some minor departments, are seated in Bonn, the former capital of West Germany.
Prior to 1871, Germany was not a unified nation state, and had no capital city. The medieval Holy Roman Empire, of which parts evolved into modern Germany, had no capital, considering itself rather as a confederation of varied territories of which some were German while others were not. The capital of the imperial ruling house (the Habsburgs) was Vienna.
After the Congress of Vienna created the formal German Confederation in 1815, a Federal Assembly convened at the Free City of Frankfurt, representing not the people of the individual German Lands but their sovereigns. Subsequently, Frankfurt briefly became the official German capital during the short-lived Revolutions of 1848 in the German states.
It was only during the 1871 Unification of Germany that the newly unified German Empire was first assigned an official capital. Since Berlin was the capital of Prussia, the leading state of the new Reich, it became the capital of Germany as well. Berlin had been the capital of Prussia since 1518. Berlin remained the capital of the united Germany until 1945. However, for a period of a few months following the First World War, the national assembly met in Weimar because civil war was ravaging Berlin. In 1945, Germany was occupied by the Allies as the outcome of World War II, and Berlin ceased to be the capital of a sovereign German state.