Both opponents first met in the Silesian Wars and Seven Years' War during the middle 18th century until the conflict's culmination in the Austro-Prussian War of 1866. However, relations were not always hostile, as both countries successfully cooperated during the Napoleonic Wars and the Second Schleswig War.