The origin of Altafulla goes back to medieval times, around the middle of the 11th century. It stood on a promontory that sloped gently down to the Mediterranean Sea and together with other fortified hills along the line of the River Gaià formed the southernmost border of the County of Barcelona. The elevated position of the township meant that there was a certain distance from the Roman or late-Roman settlement of Els Munts on the shores of the Mediterranean, and also gave it more protection from the coast. Thanks to its position, the fortress came to dominate the surrounding area and, at the same time, the Via Augusta became the major thoroughfare through the region.

Indeed, the castle of Altafulla still boasts a privileged and preeminent position today, a faithful reflection of the conditions of feudal occupation of the 11th century, as if it had emerged from the very rock on which it stands. The building, in a triangular or trapezoid shape, revolves around the inner courtyard which was originally used as a tower before three other structures were added to it. The structure still looks like a fortress and is flanked by various towers with battlements and a portcullis, features that point to a certain military use.

Today, the urban medieval layout of the town can be traced through the old quarter, known as the Vila Closa, which refers to a walled enclosure. This area is characterized by its steep streets and noteworthy features such as the passageway of Sant Teresa and the Sant Martí parish church.

The whole of this medieval complex, with its squares and the façades of its 18th century mansions, is imbued with a sense of tranquillity and elegance, well deserving its nomination as an asset of national interest and subsequent declaration as a Historic and Artistic site by the Catalan government in 1998.

The medieval perimeter of the walled quarter that surrounded the castle of Altafulla was surpassed by the urban growth of the 17th and 18th centuries and the present Vila Closa when the town expanded towards the sea. The Vila Closa refers to the part of town enclosed by the medieval walls, of which one section, two towers and three gateways that give access to the area remain, now renovated. Down towards the sea, the current maritime district, the roads are much wider and run parallel to the old Via Augusta, and evoke a rich and prosperous town with the mansion houses of the important merchant oligarchy on Carrer Botigues de Mar.