William's grandson, Elector Frederick William, sided with the Austrian Empire in the Austro-Prussian War. Following the Prussian victory his lands were annexed by Prussia in 1866. Along with the annexed Duchy of Nassau and Free City of Frankfurt, Hesse-Kassel became part of the new Province of Hesse-Nassau of the Kingdom of Prussia.