Larnaca has been inhabited since the 14th century B.C. It was founded by the Mycenaean-Achaeans Greeks. It was a small town initially; with a small fort being constructed near its harbour during the Byzantine rule. It is not clear when the Byzantine fort was first built but many resources and research carried around the castle suggest that initial construction started in late 12th century. The city gained importance during the medieval ages; after the Genovese occupied the main port of the country; Famagusta; and the need for a new port town emerged. Soon after Larnaca became one of the main ports of the Kingdom of Cyprus and the need of a castle protecting the city and the harbour emerged. Between the years 1382-1398 the small Byzantine fortification located near the harbour was upgraded to a more substantial castle.