The flag of Austria has three equal horizontal bands of red (top), white, and red. The Austrian triband is the second-oldest flag in use at least since 1230, after the Danish flag (which has been in use since 1219).
The flag traces back to the coat of arms of the medieval Babenberg dynasty, a silver band on a red field (in heraldry: Gules a fess Argent). The origin of the Bindenschildhas not been conclusively established, it possibly derived from the Styrian margraves of the Otakar noble family, who themselves may have adopted the colours from the descendants of the Carinthian duke Adalbero (ruled 1011–1035), a scion of the House of Eppenstein extinct in 1122. However, already the Babenberg margrave Leopold III of Austria (1095–1136) was depicted with a triband shield in 1105.
When the last Otakar Duke Ottokar IV of Styria died in 1192, the Styrian duchy was inherited by the Babenberg duke Leopold V of Austria according to the 1186 Georgenberg Pact. According to the 18th century historian Chrysostomus Hanthaler, his grandson Duke Frederick II of Austria (1230–1246), nicknamed the "Quarrelsome" or the "Warlike", the last of the Babenberg dynasty, designed a new coat of arms in red-white-red after his accession—an attempt to prevail against reluctant local nobles and to stress his autonomy towards Emperor Frederick II. The triband is first documented in a seal on a deed issued on 30 November 1230, confirming the privileges ofLilienfeld Abbey. The medieval chronicler Jans der Enikel reports that the duke appeared in a red-white-red ceremonial dress at his 1232 accolade in the ViennaSchottenstift.
The Babenberg family colors developed to the coat of arms of their Austrian possessions. After the dynasty had become extinct with Frederick's death at the 1246 Battle of the Leitha River, they were adopted by his Přemyslid successor King Ottokar II of Bohemia. Upon the 1278 Battle on the Marchfeld the colours were assumed by the victorious House of Habsburg and gradually became the coat of arms of the dynasty's Hereditary Lands within the Habsburg Monarchy.
According to legend, the flag was already invented by Duke Leopold V of Austria as a consequence of his fighting during the Siege of Acre. After a fierce battle, his white surcoat was completely drenched in blood. When he removed his belt, the cloth underneath was untouched by it, revealing the combination of red-white-red. So taken was he by this singular sight that he adopted the colors and scheme as his banner. The incident was documented as early as 1260, though it is highly unlikely.