The Battle of Devina occurred on 17 July 1279 near the small fortress of Devina, close to the modern town of Kotel, Burgas Province, south-eastern Bulgaria. Ivailo of Bulgaria attacked the Byzantine army sent to help his rival for the crown Ivan Asen III.
In 1277 in a popular uprising led by Ivailo broke out in north-eastern Bulgaria against the incapability of Emperor Constantine Tikh Asen to cope with the constant Mongol invasions which devastated the country for years. The Byzantine Emperor Michael VIII Palaiologos decided to make use of the instability in Bulgaria. He sent an army to impose his ally Ivan Asen III on the throne. Ivan Asen III gained control of the area between Vidin and Cherven. Ivailo was besieged by the Mongols at Drastar (Silistra) and the nobility in the capital Tarnovo accepted Ivan Asen III for Emperor.
In the same year, however, Ivailo managed to make a breakthrough in Drastar and headed for the capital. In order to help his ally, Michael VIII sent a 10,000-strong army towards Bulgaria under Murin. When Ivailo learned of that campaign he abandoned his march to Tarnovo. Although his troops were outnumbered, the Bulgarian leader attacked Murin in the Kotel Pass on 17 July 1279 and the Byzantines were completely routed. Many of them perished in the battle, while the rest were captured and later killed by orders from Ivailo.
After the defeat Michael VIII sent another army of 5,000 troops under Aprin but it was also defeated by Ivailo before reaching the Balkan Mountains. Without support, Ivan Asen III had to flee to Constantinople. The internal conflict in Bulgaria continued to 1280 when Ivailo had in turn to flee to the Mongols and George I Terter ascended to the throne.