Bavaria, land of the Bavarians, a German tribe, came to existence sometime in the sixth century AD as a border region, or march, of the Frankish Kingdom. The entity remained in existence in one way or another until modern times, first as a Duchy of the Holy Roman Empire, then as a Principality of the Empire. It became an independent country in 1806 upon the disintegration of the Empire, and remained a sovereign nation until it formally joined the Prussian-led German Empire.
As part of Germany, Bavaria remained a Kingdom until the establishment of the Weimar Republic in 1919, when it was renamed the Free State of Bavaria. It is still know this way under the Federal Republic of Germany.