Hainburg, beautifully situated between two hills on the Danube some 40km/25mi east of Vienna, was in the medieval period a fortified town on the eastern frontier of the Holy Roman Empire. The town lies just short of the border with the former Czechoslovakia. The old settlement which grew at the foot of a castle received its town charter in 1244
In the castle chapel in 1252 the Bohemian King Przemsyl Ottokar married the Duchess Margarethe of Austria. The town was frequently attacked by Turks and Magyars and suffered from the plague. In an attack by the Turks in 1683 more than 8,000 of its inhabitants were killed. It was not until 1724, when the Hainburg Tobacco Factory was founded, that the town began to prosper.
Hainburg is surrounded by well-preserved 13th century walls, with 12 towers, which stretch from the castle above down to the Danube. It boasts many handsome burghers' houses of the Gothic, Renaissance and Baroque periods.