After serving Austria with distinction in several battles, he was given a major command in Hesse's small army in its war, as an ally of Austria, with Prussia in 1866. By this time his wife and children had taken up their home at Alexander's small castle at Seeheim-Jugenheim in Hesse, to which he retired after Prussia defeated Austria and Hesse. Although the electorate of Hesse-Kassel, ruled by another branch of Alexander's family, was annexed by Prussia for adhering to the losing side, the fact that Hesse-Darmstadt's grand duke was the brother-in-law of the Russian tsar saved its independence, although not without loss of territory. Henceforth, Alexander and his family alternated between their castle in the grandducal capital of Darmstadt, and their country home a few hours away by carriage.