Dinaburga castle is situated on the right bank of the Daugava River, about 18 km on the east from Daugavpils, 3 km on the south-west from the closest railway station and 1 km from Daugavils-Krāslava motorway, in the place of the ancient Naujene castle mound.
In 1277, Dinaburga castle was built by Ernest von Rassburg, the Livonian Order Master, in the place of Naujene castle mound as a border fortress for protection against Lithuania. Immediately after construction of the castle, in 1278, it was surrounded by the Lithuanian army under leadership of King Traidenis. During the 13 century the area inhabited by Latgallians included also the current south-east part of Latgale, which became property of the Order in 1264.
Since from 1811 to 1829 castle ruins had been intensively used as a building material, at the time of the first excavations the upper part of the castle wall had already been destroyed – stones and bricks had been broken out and taken to Daugavpils for construction of the new fortress. Despite the brutal destructions excavations were successful – they managed to obtain enough materials in order to get an idea about size and layout of the castle.
The castle building was approximately 59 m long at its largest place and approximately 26 m wide at its widest place (on the west). Very large bricks (dimensions 30 x 14 x 10 cm), stones (mainly for foundations) and limestone plates were used as a construction material.