Austria-Hungary dispatched a separate army to invade Montenegro and to prevent a junction of the Serbian and Montenegrin armies. This force, however, was repulsed, and from the top of the strongly fortified Lovćen, the Montenegrins carried on the bombardment of Kotor held by the enemy. The Austro-Hungarian army managed to capture the town of Pljevlja while on the other hand the Montenegrins took Budva, then under Austrian control. The Serbian victory at the Battle of Cer (15–24 August 1914) diverted enemy forces from Sandjak, and Pljevlja came into Montenegrin hands again. On August 10, 1914, the Montenegrin infantry delivered a strong attack against the Austrian garrisons, but they did not succeed in making good the advantage they first gained. They successfully resisted the Austrians in the second invasion of Serbia (September 1914) and almost succeeded in seizing Sarajevo. With the beginning of the third Austro-Hungarian invasion, however, the Montenegrin army had to retire before greatly superior numbers, and Austro-Hungarian, Bulgarian and German armies finally overran Serbia (December 1915). However, the Serbian army survived, and led by King Peter I of Serbia, started retreating across Albania. In order to support the Serbian retreat, the Montenegrin army, led by Janko Vukotic, engaged in the Battle of Mojkovac (6–7 January 1916). Montenegro also suffered a large scale invasion (January 1916) and for the remainder of the war remained in the possession of the Central Powers. See Serbian Campaign (World War I) for details. The Austrian officer Viktor Weber Edler von Webenau served as the military governor of Montenegro between 1916 and 1917. Afterwards Heinrich Clam-Martinic filled this position.