After the death of emperor Andronikos III in June 1341, two factions emerged at the imperial court concerned with the regency for the infant co-emperor John V Palaiologos. Aided by the intrigues of Alexios Apokaukos, the two sides engaged in a Byzantine civil war that lasted until 1347. After some maneuvering one faction formed around John Kantakouzenos, who was a supporter of Gregory Palamas, and included the provincial magnates from Macedonia and Thrace. The other faction, which seized imperial power, was led by Patriarch John Kalekas and Alexios Apokaukos, and supported Andronikos's widow Anna of Savoy in her efforts to assume the regency for the young John V Palaiologos. In forming the faction, Anna made Patriarch John a regent and appointed Alexios Apokaukos an "eparchos" (urban prefect).