In order to protect both the building and the city on its southern flank, the mediaeval Dockyards were fortified, with the following features: the wall, the Saint Madrona Gate, the Eastern Tower and the Flea Tower which no longer stands.
The Saint Madrona Gate was one of the entrances to the city and is the only one of the 15 mediaeval gates of the city to have survived. It was built in the fourteenth century, at the same time as the wall. These gates were administrative rather than defensive; they were used for charging tariffs on goods and tolls on people who entered and left the city.
There were entrances in square towers like Saint Madrona, or circular ones, like Saint Severus, and others flanked by two polygonal towers like that of the Boqueria.
The Eastern Tower is the second of the towers to survive from the first, 13th century, dockyard. The number of towers in the wall varied over time. There were many types, the square and polygonal ones being the oldest, and the semicircular and horseshoe ones being more recent (around the end of the 14th century.)
The Flea Tower, which no longer stands, was a large construction situated on a base, and was aligned with the mediaeval wall which traced the route of the Rambla. It housed troops and was a landmark of the Dockyards.