When the emperor Louis divided his dominions between his sons in 817, Louis received Bavaria and the neighbouring lands but did not undertake the governing of such until 825, when he became involved in wars with the Wends and Sorbs on his eastern frontier.
When the emperor Louis the Pious divided his dominions between his sons in 817, Louis was made the King of Bavaria, following the practice of emperor Charlemagne of bestowing a local kingdom to a close family member who then would serve as his lieutenant and local governor. In 825 he became involved in wars with the Wends and Sorbs on his eastern frontier.