Except for Saxony, the other German states allied to Austria played little role in the main campaign. Hanover's army defeated Prussia at the Second Battle of Langensalza on 27 June 1866, but, within a few days, they were forced to surrender by superior numbers. Prussian armies fought against Bavaria, Württemberg, Baden and the Hessian states on the river Main, reaching Nuremberg and Frankfurt. The Bavarian fortress of Würzburg was shelled by Prussian artillery, but the garrison defended its position until armistice day.