Due to the expensive and unsuccessful wars, repeated Mongol raids, and economic instability, Maria's government was faced with a revolt in 1277; the Uprising of Ivaylo. What is clear is that a swineherd or swine-owner named Ivaylo became a leader of the discontented and attracted many (presumably mostly lower-class) followers, asserting his control over a significant area. Tsar Constantine set out against Ivaylo with his guard, but was decisively defeated and slain in his chariot in 1277. Ivaylo himself is credited with the killing. Although he was able to extend his authority across much of the country, he also met with resistance, and the capital Tarnovo remained under the control of the legitimate emperor Michael Asen II and his mother Maria Kantakouzene.