During the 9th century the Frankish supremacy vanished, and the mark was overrun by the Moravians, and then by the Magyars, or Hungarians, who destroyed the few remaining traces of Frankish influence.

A new era dawned after Otto the Great was elected German The house of Babenberg. king in 936, and it is Otto rather than Charlemagne who must be regarded as the real founder of Austria. In August 955 he gained a great victory over the Magyars on the Lechfeld, freed Bavaria from their presence, and refounded the East Mark for the defence of his kingdom. In 976 his son, the emperor Otto II., entrusted the government of this mark, soon to be known as Austria, to Leopold, a member of the family of Babenberg (q.v.), and its administration was conducted with vigour and success. Leopold and his descendants ruled Austria until the extinction of the family in 1246, and by their skill and foresight raised the mark to an important place among the German states. Their first care was to push its eastern frontier down the Danube valley, by colonizing the lands on either side of the river, and the success of this work may be seen in the removal of their capital from Pöchlarn to Melk, then to Tulln, and finally about 1140 to Vienna. The country as far as the Leitha was subsequently incorporated with Austria, and in the other direction the district between the Enns and the Inn was added to the mark in 1156, an important date in Austrian history.

Duchy of Austria created, 1156. Anxious to restore peace to Germany in this year, the new king, Frederick I., raised Austria to the rank of a duchy, and conferred upon it exceptional privileges. The investiture was bestowed not only upon Duke Henry but upon his second wife, Theodora; in case of a failure of male heirs the duchy was to descend to females; and if the duke had no children he could nominate his successor. Controlling all the jurisdiction of the land, the duke's only duties towards the Empire were to appear at any diet held in Bavaria, and to send a contingent to the imperial army for any campaigns in the countries bordering upon Austria. In 1186 Duke Leopold I. made a treaty with Ottakar IV., duke of Styria, an arrangement which brought Styria and upper Austria to the Babenbergs in 1192, and in 1229 Duke Leopold II. purchased some lands from the bishop of Freising, and took the title of lord of Carniola. When the house of Babenberg became extinct in 1246, Austria, stretching from Passau almost to Pressburg, had the frontiers which it retains to-day, and this increase of territory had been accompanied by a corresponding increase in wealth and general prosperity.

The chief reason for this prosperity was the growth of trade along the Danube, which stimulated the foundation, or the growth, of towns, and brought considerable riches to the ruler. Under the later Babenbergs Vienna was regarded as one of the most important of German cities, and it was computed that the duke was as rich as the archbishop of Cologne, or the margrave of Brandenburg, and was surpassed in this respect by only one German prince, the king of Bohemia. The interests of the Austrian margraves and dukes were not confined to the acquisition of wealth either in land or chattels. Vienna became a centre of culture and learning, and many religious houses were founded and endowed. Duke Leopold II. The acme of the early prosperity of Austria was reached under Duke Leopold II., surnamed the Glorious, who reigned from 1194 to 1230. He gave a code of municipal law to Vienna, and rights to other towns, welcomed the Minnesingers to his brilliant court, and left to his subjects an enduring memory of valour and wisdom. Leopold and his predecessors were enabled, owing to the special position of Austria, to act practically as independent rulers.

Cherishing the privilege of 1156, they made treaties with foreign kings, and arranged marriages with the great families of Europe. With full control of jurisdiction and of commerce, no great bishopric nor imperial city impeded the course of their authority, and the emperor interfered only to settle boundary disputes.

The main lines of Austrian policy under the Babenbergs were warfare with the Hungarians and other eastern neighbours, and a general attitude of loyalty towards the emperors. The story of the Hungarian wars is a monotonous record of forays, of assistance given at times to the Babenbergs by the forces of the Empire, and ending in the gradual eastward advance of Austria. Duke Frederick II., the Quarrelsome. The traditional loyalty to the emperors, which was cemented by several marriages between the imperial house and the Babenbergs, was, however, departed from by the margrave Leopold II., and by Duke Frederick II. During the investiture struggle Leopold deserted the emperor Henry IV., who deprived him of Austria and conferred it upon Vratislav II., duke of the Bohemians. Unable to maintain his position, Vratislav was soon driven out, and in 1083 Leopold again obtained possession of the mark, and was soon reconciled with Henry. Very similar was the result of the conflict between the emperor Frederick II. and Duke Frederick II. Ignoring the the privilege of 1156, the emperor claimed certain rights in Austria, and summoned the duke to his Italian diets.

Frederick, who was called the Quarrelsome, had irritated both his neighbours and his subjects, and complaints of his exactions and confiscations reached the ears of the emperor. After the duke had three times refused to appear before the princes, Frederick placed him under the ban, declared the duchies of Austria and Styria to be vacant, and, aided by the king of Bohemia, the duke of Bavaria and other princes, invaded the country in 1236. End of the House of Babenberg. He met with very slight opposition, declared the duchies to be immediately dependent upon the Empire, made Vienna an imperial city, and imposed other changes upon the constitution of Austria. After his departure, however, the duke returned, and in 1239 was in possession of his former power, while the changes made by the emperor were ignored. Continuing his career of violence and oppression, Duke Frederick was killed in battle by the Hungarians in June 1246, when the family of Babenberg became extinct.