Ephesus was a seaport of Aegean Asia Minor. Ephesus was known in Antiquity for the cult of Artemis, since they had built a temple in honor of the goddess, which was considered as one of the Seven Wonders of the ancient world. It also had one of the most important harbors of Asia Minor and as capital of the province of Asia, Ephesus enjoyed considerable prosperity. In 262 AD the city was attacked by the Goths, and the temple of Artemis was destroyed.
The numerous Late Antique buildings usually used spolia and were adorned with frescoes, mosaics, and marble. Constantius II, Arcadius, and especially Justinian I adorned the city, which is best known from its remains. They indicate that classical public works and services—theater, market, baths, the civic center, and marble-paved, colonnaded streets lined with shops—were maintained and that richly decorated private houses continued to be built until the early 7th century. During that period Ephesus was also well known for its schools. The city supported teachers and philosophers financially. The most well known philosopher was Maximus, the teacher of Emperor Julian. During Late Antiquity there was in Ephesus, at least one school of medicine which was probably operating even at a later time.
Throughout the Early Byzantine period, the city was an economic, political and religious centre of the province of Asia, as well as the seat of the proconsul of Asia, its metropolis and, due to its ecclesiastical history, an important destination for pilgrims. Traditions that associated Ephesus with St. Paul, the Apostle John, the Virgin, and the Seven Sleepers made it the natural site for the councils of 431 and 449 and the frequent goal of pilgrimage. The city was Christianized by the 4th century, and saw the erection of churches and monumental crosses and the transformation of open public spaces as private buildings encroached on them. There are two huge churches that have survived: the Basilica of St. Mary, seat of the councils, built in the 4th century and twice rebuilt on a smaller scale after the 6th century, and the Basilica of St. John. The latter, the largest and most important church in the city, had its beginnings in the tetrapylon martyrion erected over John's purported tomb as early as around 300. Probably around 450 a cruciform church with a wooden roof was built on the site, incorporating the tetrapylon at its crossing. The church was rebuilt under Justinian I by 565 and was modeled after the Church of the Holy Apostles in Constantinople.
The prosperity of Late Antiquity came to an end with the Byzantine-Persian Wars (602-628), during which the whole of Asia Minor suffered from ravages by the Persian army. In 614 a strong earthquake hit Ephesus and caused havoc to a great part of the city. The Persian Wars were followed by the fierce Arab raids in the 7th century.
New fortifications enclosed less than half the ancient city and created a new defensive center around the Basilica of St. John about two km away. Its walls were probably a response to the Arab attacks that began in 654. Around the 7th or the 8th century, Ephesus was embodied in the new administrative organization of the Empire as part of the theme of Thrakesion. As a matter of fact it seems to have been the capital of this theme. From that time onwards, the history of the city was closely related to the activity of various known strategoi of the theme, who were stationed in Ephesus from time to time.
Ephesus was the site of a major regional fair in the 8th century, which generated considerable revenue. By the 9th century, neglect and the resultant silting had ruined the harbor and the city had moved to the hill around the Church of St. John to become an inland fortress. The city survived the attack of the Paulicians in 867/8 or 869/70, had Italian concessions after 1082, and was occupied by the Turks 1090-96. It was then usually known as "Theologos" (after St. John) or simply the "Kastron." In 1147 Ephesus was host to the Second Crusade and in 1206 recognized the Laskarids, under whom it became a center of learning. Nikephoros Blemmydes taught here, with George Akropolites and Theodore Laskaris among his pupils. The late 13th century brought Turkish threats, temporarily dispelled by the Catalan Grand Company, which made Ephesus its base in 1304, yet it fell to the Turks of Aydın the same year.