In 1045 Constantine annexed the Armenian kingdom of Ani, but this expansion merely exposed the empire to new enemies. In 1046 the Byzantines came into contact for the first time with the Seljuk Turks. They met in battle in Armenia in 1048 and settled a truce the following year. Even if the Seljuk rulers were willing to abide by the treaty, their unruly Turcoman allies showed much less restraint. The Byzantine forces would suffer a cataclysmic defeat at the battle of Manzikert in 1071. Constantine began persecuting the Armenian Church, trying to force it into union with the Orthodox Church. In 1046, he refounded the University of Constantinople by creating the Departments of Law and Philosophy.