When Louis the Pious's wife died, he remarried (Judith) and had a son, Charles, in 823. In all of his wills he had made his three sons Pepin of Aquitaine, Louis of Bavaria, and Lothar his co-Emperor, successors. When Charles was born, he tried desperately to include him. In 829, he dropped Lothar's imperial title and sent him off to Italy. The next year the three brother united and attacked, forcing their father to abdicate, Lothar to be given back his imperial title, and Judith to be sent off to a nunnery. By the next year, Louis had re-gained his power, brought back his wife, dropped Lothar completely from the will, replaced him with Charles, and refused to allow Lothar to ever return to court without permission.
That year Pepin revolted on his own. Louis of Bavaria followed the next year and they both attacked. Emperor Louis declaired that Pepin was formally deposed of his titles, but he could not enforce this order. In 833, the three brothers gained support from Pope Gregory IV and many of the Emperor Louis's own generals. Lothar made a settlement: Louis and Charles were imprisoned, Judith sent in exile to Italy under eye of Lothar, and Louis of Bavaria and Pepin were to gain territory (formerly under imperial authority). The next year, however, Pepin and Louis of Bavaria released their father and brother from jail, Judith was brought back, and peace was made. Louis died in 840.