Bayezid was defeated by Timur at the Battle of Ankara, beginning a civil war for succession between his sons – a period known as the "Ottoman Interregnum". Taking advantage of the situation, Junayd attacked the Aydınid brothers, Isa and Umur II, who had been restored by Timur. By early 1406, Isa and Umur were dead and Junayd was the undisputed ruler of the former Aydınid domains. Like all the rulers of the region, Christian and Muslim alike, Junayd was also an active participant in the civil war between Bayezid's sons İsa, Süleyman, Musa and Mehmed, in which he changed his allegiance several times. He supported İsa against Mehmed, and became a vassal of Süleyman. His persistent attempts to exploit the conflict to broaden his power and independence forced Süleyman to send him as provincial governor of Ohrid in Rumeli in 1410. After Süleyman's overthrow and death in 1411 at the hands of his brother Musa, Junayd returned to Anatolia and seized Smyrna, but had to recognize the suzerainty of Mehmed. During Mehmed's absence in Rumeli to campaign against Musa, Junayd reclaimed his independence and attacked his neighbouring rulers. As a result, in 1414 Mehmed led a regional coalition against Junayd. Junayd's mother was able to save his life, but once again Junayd was dispossessed and sent to Rumeli as governor of Nicopolis. From there, he joined the unsuccessful rebellion of Mustafa Çelebi, until the Byzantines agreed to intern him and Mustafa in 1416.