At the Battle of Deultum in the summer of 377 during the Gothic War of 376–382 an Eastern Roman army was defeated by a Gothic raiding party outside Deultum, and the city was sacked. Deultum was later rebuilt on a smaller scale, and, in the second half of the 5th century, new walls were constructed and all unprotected buildings were demolished to ensure hostile forces did not use them as cover. However, the walls were destroyed by Slavs and Avars at the end of the 6th century.