The engagement was part of the Duke of Marlborough's campaign to save the Habsburg capital of Vienna from a threatened advance by King Louis XIV's Franco-Bavarian forces ranged in southern Germany.
Once the Elector and his co-commander, Marshal Marsin, knew of the Allies' objective, they dispatched Count d'Arco with an advance force of 12,000 men from their main camp at Dillingen to strengthen and hold the Schellenberg heights above the town.
[11] With the Allied heavy artillery delayed by bad roads, Marlborough and William of Baden decided these fortifications were too strong, bypassing Dillingen, and heading towards Donauwörth instead.
However, its oval shaped summit was flat and open, and its 70-year-old defences, including an old fort built by the Swedish king Gustavus Adolphus during the Thirty Years' War, were neglected and in a dilapidated state.
"[13] The Elector, whose relationship with Villars had since collapsed, had initially ignored the advice to repair the decaying defences, but once it was realised that Donauwörth was to be attacked, Count d'Arco, a Piedmontese officer, was despatched from the camp at Dillingen with orders to strengthen and hold the position.
It was here when Marlborough received an urgent message from Baron Moltenburg, Prince Eugene's Adjutant-General, that Marshal Tallard was marching with 35,000 troops through the Black Forest to reinforce the Franco-Bavarian army.
Baden, whose wing of the army marched behind Marlborough's, would hold a brigade of Imperial grenadiers ready for action when the opportunity came as there was insufficient room in front of the Schellenberg for them to fully deploy.
[16] Riding far ahead of the army Marlborough personally examined the enemy position, observing through his telescope preparations for a camp on the far side of the river in expectation of the arrival of the Elector's main force the following day.
With the aid of French engineer officers d'Arco started to repair and strengthen the two miles (3.2 km) of old entrenchments that connected the fort of Gustavus with the Danube on one side, and the town walls on the other.
A French commander in Bavarian service and chronicler of the period, Colonel Jean Martin de la Colonie, later wrote – "The time left to us was too short to complete this satisfactorily.
By 10:00 Marlborough's Quartermaster-General, William Cadogan, began to mark out land for an encampment within sight of the Schellenberg – short of the Wörnitz – to give the impression they were intending a leisurely siege.
[18] A female dragoon, Christian Welsh (she had disguised her true sex) remembered, "Our vanguard did not come into sight of the enemy entrenchments til the afternoon; however, not to give the Bavarians time to make themselves yet stronger, the duke ordered the Dutch General Goor ... to attack as soon as possible.
"[25] At about 17:00, as a preliminary to the attack, Marlborough's artillery commander, Colonel Holcroft Blood, pounded the enemy from a position near Berg; each salvo was countered by d'Arco's guns from Gustavus's fort and from just outside the Boschberg wood.
[citation needed] General d'Arco now ordered de la Colonie's French grenadiers into reserve on top of the Heights (above the breastworks manned by the Bavarians), ready to plug any gaps in their defences at the appropriate time.
"[27] Notwithstanding this barrage, and despite losing five officers and 80 grenadiers before firing a shot, de la Colonie insisted his French regiment stayed at their post, determined as he was to maintain discipline and ensure his troops would be in good order when called into action.
[32] To aid their assault, each Allied soldier carried a bundle of fascines (earlier cut from the Boschberg wood), with which to bridge the ditches in front of the breastworks to speed their passage.
[37] The other Allied commander, the Margrave of Baden (who had entered the battle half an hour after Marlborough), also noticed this opportunity and was soon hurrying with his grenadiers from the hamlet of Berg, and across the Kaibach stream to assault the position.
[f] Noticing the danger d'Arco hurried to the rear to summon his dismounted French dragoons (held back in the lee of the hill) in an attempt to stem the advancing Imperialists marching up the glacis.
But the defenders, including la Colonie, (unaware that the Imperialists had penetrated their left flank, and that d'Arco had retreated to Donauwörth),[41] were still confident in their ability to repel the enemy – "We remained steady at our post; our fire was regular as ever, and kept our opponents in check.
"So occupied were we in defence of our own particular post ..." After establishing themselves at the summit of the Heights on the Allied right, Baden's men now fired upon the surprised defenders of the Schellenberg, compelling them to re-align in order to meet this unexpected threat.
[45] De la Colonie was one of the few to escape, but the Elector of Bavaria had lost many of his best troops which was to have a profound effect on the ability of the Franco-Bavarian forces to face the Allies in the rest of the campaign.
[52] With the town abandoned that night by Colonel DuBordet, the Elector, who had arrived within sight of the battle with reinforcements only to see the flight and massacre of his best troops, drew his garrisons out of Neuburg and Ratisbon, and fell back behind the river Lech near Augsburg.
As the Elector sat behind his defences at Augsburg Marlborough sent his troops deep into Bavaria on raids of destruction, burning buildings and destroying crops, trying to lure the Bavarian commander into battle or convince him to change his allegiance back to Emperor Leopold I.
The Emperor had offered a full pardon, as well as subsidies and restoration of all his territories, with additional lands of Pfalz-Neuburg and Burgau if he returned to the Imperial fold, but negotiations between the parties were making little headway.
Although the Elector wavered somewhat in his allegiance to Louis XIV, his resolve to continue fighting against Leopold I and the Grand Alliance was stiffened when news arrived that Tallard's reinforcements – some 35,000 men – would soon be in Bavaria.
On 16 July the Duke wrote to his friend Heinsius, the Grand Pensionary of Holland, "We are advancing into the heart of Bavaria to destroy the country and oblige the Elector one way or the other to a compliance".
De La Colonie thought that reports of the devastation were perhaps exaggerated for propaganda purposes; yet Christian Davies serving with Hay's Dragoons wrote, "The allies sent parties on every hand to ravage the country ... We spared nothing, killing, burning or otherwise destroying whatever we could not carry off.
[66] The failure of the Empire to provide an effective siege train had, up to this point, robbed the Allies of victory – neither Munich nor Ulm could be taken, and the Elector had neither been defeated nor compelled to change allegiance.
[69] Eugene, shadowing Tallard, was also heading south with 18,000 men, but he had been forced to leave behind 12,000 troops guarding the Lines of Stollhofen[g] with which to prevent Villeroi bringing further French reinforcements to the Danube.
To give themselves another major crossing over the Danube a plan by Baden to besiege the city of Ingolstadt with a force of 15,000 men was agreed to, despite leaving the Allied army numerically inferior.