Ludwig II succeeded to the throne aged 18. Two years later Bavaria allied with Austria in a war with Prussia, which they lost. Following the Franco-Prussia war, in which they sided with Prussia, they became part of the new German Empire. Ludwig remained King of Bavaria, but withdrew from many federal state affairs as remained to Bavaria in favor of extravagant artistic and architectural projects. He commissioned the construction of two lavish palaces (Herrenchiemsee and Linderhof) and the Neuschwanstein Castle, and was a devoted patron of the composer Richard Wagner. Today, his legacy of architecture and art includes many of Bavaria’s important tourist attractions.