Throughout the 6th century, Moesia Prima was often invaded by Slavs. The province was also invaded but the Avars who took Singidunum and Viminacium during the war of 582-584. During emperor Maurice's military campaigns against Avars and Slavs, Moesia Prima served as a base of military operations.