After the destruction of Salamis, the existing capital of Cyprus, by Arab raids in 647, along with extensive damage to other coastal settlements, the economy of the island became much more inward-looking and inland towns gained relative significance. Nicosia benefited from this and functioned as an outlet of the agricultural products from its hinterland, the Mesaoria plain. It further was at an advantageous position due to its ample water supply. As such, the town developed enough for the Byzantine Empire to choose Nicosia as the capital of the island around 965, when Cyprus rejoined the Byzantine Empire. The Byzantines moved the island's administration seat to Nicosia primarily for security reasons as coastal towns were often suffering from raids. From that point on it has remained as the capital of Cyprus. Nicosia was the seat of the Byzantine governor of Cyprus; the last Byzantine governor was Isaac Komnenos, who declared himself emperor of the island and ruled the island from 1183 to 1191. Testimony as late as 1211 indicates that Nicosia was not a walled city at that point and thus that the Byzantines did not build a city wall, thinking that the city's inland location would be sufficient for defense purposes. The Byzantines did, however, build a relatively weak fort within the city. The economy under Byzantine rule consisted mostly of the trading of agricultural goods, but the town also produced luxury items and metalware due to the presence of the imperial administration.