The War of the Bavarian Succession was resolved without prolonged fighting; Charles Theodore succeeded in all of Bavaria except for the district east of the Inn River, known as the Innviertel, assigned to Austria by the Peace of Teschen (May 1779). A second attempt to make the exchange in 1784 was also opposed by Charles August, again with Prussian support, and also failed. However, Charles Theodore outlived Charles August who, dying in 1795 without sons, left his claim to Bavaria to his brother, Maximilian Joseph, who would succeed in vastly enlarging that realm and, in 1806, becoming its king.