Gortyn, Gortys or Gortyna is a municipality and an archaeological site on the island of Crete, 45 km away from the capital Heraklion. The seat of the municipality is the village Agioi Deka. Gortyn, the Roman capital of Crete, was first inhabited around 3200 BC, and was a flourishing Minoan town between 1600-1100 BC.
It is located in the valley of Messara in the south of the Psiloritis mountain, in the current position of the settlements of Metropolis and Agioi Deka, and near the Libyan Sea.
There is evidence of human occupation in Gortyn as far back as the Neolithic era (7000 BC). Many artifacts have been found from the Minoan period, as well as some from the Dorian (circa 1100 BC). Although it is disputed whether the city was in development during the Minoan period, it is true that it existed during the heroic times, since it is referenced by Homer, among the cities of Crete with particular flowering and was mentioned as well fortified.
The city of Gortyn surpassed the prominence of Phaistos during the first millennium BC, Phaistos having been the most significant city on Crete during Minoan times. The period of its great prosperity, however, coincided with the Hellenistic era. Gortyn exceeded in force and prosperity the other cities of Crete and took the hegemony of the island, dominating the entire valley from Messara to Levina, and later in the 2nd century after the destruction of Phaistos extended its power to Matala.
Gortyn had excellent relations with Ptolemy IV of Egypt, and experienced a new period of prosperity during the Roman period. As it had allied with the Romans, it avoided the disaster that happened to many other Cretan cities, when invaded by Quintus Caecilius Metellus Creticus in 68 BC.
Gortyn continued to rise under Roman rule, and became the capital of the joint province of Creta et Cyrenaica. From the 4th century it was the capital of a separate province of Crete. The city was destroyed in ca. AD 828 by invading Arabs, who established their own state on the island.
Among archaeologists, ancient historians, and classicists Gortyn is known today primarily because of the 1884 discovery of the Gortyn Code which is both the oldest and most complete known example of a code of ancient Greek law. The code was discovered on the site of a structure built by the Roman emperor Trajan, the Odeon, which for the second time, reused stones from an inscription-bearing wall that also had been incorporated into the foundation of an earlier Hellenistic structure. Although portions of the inscriptions have been placed in museums such as the Louvre in Paris, a modern structure at the site of the mostly ruined Odeon now houses many of the stones bearing the famous law code.