In 324 AD, the Roman Empire split, and the Eastern Roman Empire–later known as the Byzantine Empire–continued to control or influence the region until 636 AD. Christianity had become legal within the empire in 313 AD after Emperor Constantine converted to Christianity. The Edict of Thessalonka made Christianity the official state religion in 380 AD. Transjordan prospered during the Byzantine era, and Christian churches were built everywhere. The Aqaba Church in Ayla was built during this era, it is considered to be the world's first purpose built Christian church. Umm ar-Rasas in southern Amman contains at least 16 Byzantine churches. Meanwhile, Petra's importance declined as sea trade routes emerged, and after a 363 earthquake destroyed many structures, it declined further, eventually being abandoned. The Sassanian Empire in the east became the Byzantines' rivals, and frequent confrontations sometimes led to the Sassanids controlling some parts of the region, including Transjordan.