The history of the city probably dates back to the 7th century, when the town known as "Ragusa" was founded by refugees from Epidaurum ("Ragusa Vecchia"). It was under the protection of the Byzantine Empire and later under the sovereignty of the Republic of Venice. Between the 14th and 19th centuries, Dubrovnik ruled itself as a free state. The prosperity of the city was historically based on maritime trade; as the capital of the maritime Republic of Ragusa, it achieved a high level of development, particularly during the 15th and 16th centuries, as it became notable for its wealth and skilled diplomacy. At the same time, Dubrovnik became a cradle of Croatian literature.