In 837, Louis crowned Charles king over all of Alemannia and Burgundy and gave him a portion of his brother Louis's land. Louis the German promptly rose in revolt, and the emperor redivided his realm again at Quierzy-sur-Oise, giving all of the young king of Bavaria's lands, save Bavaria itself, to Charles. Emperor Louis did not stop there, however. His devotion to Charles knew no bounds. When Pepin died in 838, Louis declared Charles the new king of Aquitaine. The nobles, however, elected Pepin's son Pepin II. When Louis threatened invasion, the third great civil war of his reign broke out. In the spring of 839, Louis the German invaded Swabia, Pepin II and his Gascon subjects fought all the way to the Loire, and the Danes returned to ravage the Frisian coast (sacking Dorestad for a second time).
