To the east of Stein , 2 kilometers ( 1 @.@ 2 mi ) down an old road , lay Krems , with its small population of a few hundred , at the confluence of the stream of that name and the Danube . To the west of Stein the Danube made a large curve , creating a crescent @-@ shaped floodplain between it and the mountains . At the far western end of the floodplain , where the mountains came down almost to the river 's edge , was Dürenstein with its castle , known as Schloss Dürenstein . The castle had served as a prison for Richard I of England in 1193 . In 1645 – 46 , during the Thirty Years War , the Swedes had fortified the castle and then demolished it when they withdrew . It stands at 159 meters ( 522 ft ) , on the highest ridge of a mountain fissured with clefts and pinnacles of granite . Because the mountain was sparsely vegetated , it was difficult to distinguish the ruins from the rocks . Narrow canyons cut through the mountain , and widen into the plain below . Between Dürenstein and Stein , on the flood plain , lay the hamlets of Oberloiben and Unterloiben . Near the hamlets , the Loiben flood plain was at its widest , extending at the most 762 meters ( 2 @,@ 500 ft ) from the base of the Loibenberg mountain to the bank of the river .