In 1871, the German Empire was founded, but the Kingdom of Bavaria still existed within this. It was not until after the First World War, after the German Revolution in 1918 that the territorial status changed. After the Kaiser had been overthrown and driven into exile, Bavaria became the Free State of Bavaria. This lasted throughout Weimar Republic times until early in the time of the Third Reich.