When in 1806 Napoleon I's French Empire began a war with Prussia, Saxony at first allied itself to Prussia, but afterwards joined Napoleon and entered the Confederation of the Rhine and the electorate became the Kingdom of Saxony with Elector Frederick Augustus III becoming King Frederick Augustus I.