In 366, Valens accused the Goths of breaching their 332 treaty with Constantine by aiding the usurper Procopius in 365. However, relations with the Goths had been deteriorating since Julian's contemptuous dismissal of them in 362. In any case, Valens had already attempted to secure the Danubian frontier, but a series of campaigns during 367 to 369 failed to subdue the Goths. Valens then had to deal with Goths to the northwest and Sasanians to the east simultaneously, and decided to make peace with the former, by a treaty with king Athanaric in 369, according to Themistius and Zosimus. Under this treaty, the Goths undertook not to cross the Danube. But any respite was short lived due to the continuing westward expansion of the Huns, who were progressively pushing refugees to the banks of the Dniester. They soon encountered the Tervingi Goths under Athanaric, forcing them to consider crossing the Danube into safer Thrace. In early 376 they petitioned Valens to that end, seeking Roman protection, and in the autumn he agreed to this. Estimates of the numbers who crossed vary between 90,000 and 200,000, but they outnumbered the Roman troops stationed there. There they were harassed by a corrupt official, Lupicinus, the Thracian "comes rei militaris". Hostilities rapidly escalated, with Lupicinus seizing two of their chieftains, Fritigern and Alavivus. Lupicinus, then realising his management of the Danube crossing had been disastrously mismanaged decided on a full-scale attack on the Goths near Marcianopolis in Moesia Inferior (Bulgaria), and was promptly routed, leaving Thrace undefended from the north. This was the beginning of the Gothic war of 376–382, one of many Gothic wars fought between the Romans and Goths.