Tavira's origins date back to the late Bronze Age (1,000-800 BC). In the 8th century BC it became one of the first Phoenician settlements in the Iberian West. The Phoenicians created a colonial urban center here with massive walls, at least one sanctuary, two harbours and a regular urban structure which lasted until the end of 6th century BC, when the location was abandoned in favour of a near-by site, probably due to the progressive progradation of the delta where it was located. Archaeological excavations brought to light part of a casemate fortification wall, ritual deposits and urban features pertaining to the settlement on the hill of Santa Maria.
It has been claimed that the original name of Tavira, Balsa, derives from the Phoenician storm god Baal-zephon, but other Phoenician origins have been suggested. The Roman town is located a short distance from the modern city.
After laying abandoned for a century, the settlement was revived and became even larger during the so-called Tartessian Period of Tavira. It was again abandoned by the end of the 4th century BC. Another urban center emerged at nearby Cerro do Cavaco, a fortified hill occupied until the time of Emperor Augustus.
During the time of Caesar, the Romans created a new port, some 7 kilometres (4 miles) from modern Tavira, that prospered, and decayed in parallel with the Roman Empire. When the Moors conquered Iberia in the 8th century, the port was already extinct.
Under Roman rule, Tavira was a secondary passing place on the important road between Balsa and Baesuris (modern Castro Marim).
Tavira's Moorish period (between the 8th and 13th centuries) influenced the agriculture, culture, and architecture of the area (as with its whitewashed buildings, Moorish style doors, and characteristic rooftops). The Tavira Castle, two mosques, and palaces were built by the Moors.