For a while, Tannhäuser was an active courtier at the court of the Austrian duke Frederick the Warlike, who ruled from 1230 to 1246. Frederick was the last of the Babenberg dukes; upon his death in the Battle of the Leitha River, Tannhäuser left the Vienna court.