A bitter battle waged between the House of Hapsburg and the French crown for the Spanish succession. Some historians call this war the "first world war of modern times." The archbishopric of Salzburg also became involved in this War of the Spanish Succession (1701-1714). Neighbouring Bavaria joined ranks with the French and so Salzburg literally had the enemy at its house door. Necessary counter-measures had to be taken which cost the Salzburg citizens considerable sums. The town population had to store food supplies and be armed; the national flag was hoisted and a regiment had to be mobilised as a special measure taken. The tensions lasted two years until Austria occupied Bavaria in 1704. Thus, the Salzburg regiment was no longer needed in the bishopric. In 1705 it was transferred to the upper Rhine region to reinforce the imperial army. Yet the morale was bad among the Salzburg soldiers. 300 men deserted within just four years – a fifth of the regiment's actual strength altogether. The remainder could only return home in 1713, after nearly ten years in the service of the imperial army.