bishops of Würzburg gained a dominant position. In the west, the Carolingian mayor of the palace Carloman had suppressed the last Alamannic revolt at the 746 Blood court at Cannstatt. The last tribal stem duchy to be incorporated was Bavaria in 788, after Duke Tassilo III had tried in vain to maintain his independence through an alliance with the Lombards. The conquest of the Lombard Kingdom by Charlemagne entailed the fall of Tassilo, who was deposed in 788. From that point, Bavaria was administrated by Frankish prefects, first of whom was Gerold, who governed Bavaria from 788 to 799. By establishing direct rule over Bavaria, the Franks provoked the neighbouring Avars. At that time, the eastern Bavarian border, towards the Avars, was situated on the river Enns. Already in 788, the Avars made an incursion into Bavaria, but Franko-Bavarian forces repelled them, and then launched a counterattack towards neighbouring Avarian regions, situated along the river Danube, east of the Enns. The two sides clashed near the river Ybbs, on the Ybbs Field (), where the Avars suffered a significant defeat (788). In order to secure Bavaria's eastern borders, and resolve other political and administrative questions, Charlemagne came to Bavaria in person, during the autumn of the same year (788). In Regensburg, he held a council and regulated issues regarding the Bavarian frontier counties (marches), thus preparing the basis for future actions in the east. In 790, the Avars tried to negotiate a peace settlement with the Franks, but no agreement was reached. Bavaria then became the main base for Frankish campaign against the Avars, which was initiated in 791. A large Frankish army, personally led by Charlemagne, crossed from Bavaria in to the Avarian territory beyond the river Enns, and started to advance along the river Danube, divided in two columns, but found no active resistance, and soon reached the region of Vienna Woods, at the very gates of the Pannonian Plain. No decisive battles were fought, since the Avars had fled before the advancing Frankish army. Frankish acquisition of new eastern regions, particularly those between the river Enns and the Vienna Woods, represented a significant gain for the security of Bavaria. At first, that territory was placed under the jurisdiction of the Bavarian prefect Gerold (d. 799), and subsequently organized as a frontier unit, that became known as the (Bavarian) Eastern March (). It provided safety for Bavaria's eastern