The peace between the Serbs, Byzantine foederati, and the Bulgars lasted until 839. Vlastimir of Serbia united several tribes, and Theophilos granted the Serbs independence; Vlastimir acknowledged nominal overlordship of the Emperor. The annexation of western Macedonia by the Bulgars changed the political situation. Malamir or his successor may have seen a threat in the Serb consolidation and opted to subjugate them in the midst of the conquest of Slav lands. Another cause might have been that the Byzantines wanted to divert attention so that they could cope with the Slavic uprising in the Peloponnese, meaning they sent the Serbs to instigate the war. It is thought that the rapid extension of Bulgars over Slavs prompted the Serbs to unite into a state.