to victory over Nogai's Byzantine allies at the Battle of Devina. In 1280 Ivaylo began to lose support among his followers, who were not interested in unending wars with the Byzantines, sections of the Bulgarian nobility, and Mongol raiding parties. The nobles subsequently elected George Terter I as emperor. Ivaylo decided to appeal to Nogai, personally appearing before him with a small group of followers asking the khan to make Ivaylo emperor again; Nogai at first received him warmly and invited him to a feast. But at the feast, with Ivaylo and Ivan Asen III seated to his sides, Nogai pointed at Ivaylo and said "He is an enemy of my father, the Emperor Michael VIII, and does not deserve to live." Ivaylo was executed on the spot by Nogai's guards. Nogai considered executing Ivan as well, the second pretender to the Bulgarian throne, but his wife Euphrosyne requested he spare Ivan, and Nogai relented. Ivan was allowed to flee to Asia Minor. Nogai made the new Bulgarian Emperor George Terter his vassal. After George's flight to Constantinople, Nogai set his close associate Smilets on the Bulgarian throne, keeping Bulgaria a vassal of the Golden Horde. Second Mongol invasion of Hungary In the winter of 1285, Nogai and Talabuga Khan invaded Hungary with Mongol and Cuman troops, but unlike Subutai forty years earlier, they were defeated. They invaded on two fronts with a considerable army. Nogai had been told of the perilous political situation in Hungary by fleeing Cuman warriors (King Ladislaus IV's nobles were practically rebelling against him, and Hungary had just been weakened by a Cuman rebellion they had recently defeated), and planned to capitalize on it by launching a vast campaign against the apparently weakened kingdom. The invasion plan was devised by Nogai, with two columns led by him and Talabuga. Talabuga's troops devastated Transylvania and raided as far as Pest, but the Hungarians' newly constructed fortification network gave them much trouble. The Mongol forces were unable to take any major stone castles or fortified cities and suffered from supply shortages, sallies by local Hungarian forces, and stiff resistance in any castle or town they assaulted. Eventually they were beaten by the Hungarian royal army under Ladislaus IV of Hungary near Pest, and the retreating Mongol forces were ambushed by the Székelys, losing much of their invading force. Nogai was more successful than Talabuga, staying in Hungary