On 8th April 1282, King Peter III ordered the construction of a town on the slopes of Ifach, as a guarantee for the entire coastline.

Three days later, on 11th April 1282, the king ordered Arnaldo de Mataró to divide Ifach into plots of land and to give them to all the Calpinos who wanted to build there.

However, it was not until 1298 that Roger de Llúria began the work. Roger died in 1305.

The town continued to be built, and his daughter, Margarita, was responsible for finishing the work and building the church of Nuestra Señora de los Ángeles de Ifach.

Ifach covers more than 40,000 square metres, occupying the northern slope of the Rock. The town has a walled enclosure with more than 800 linear metres of wall, the northern area being in the best condition, with more than 250 metres of preserved perimeter and nine towers. The best preserved of these is the bell tower, which is still 10 metres high.

They are arranged in an overhang to facilitate the work of the defenders, with vertical embrasures for the launching of crossbow weapons, and are linked by a parapet or patrol path that allowed the entire walled perimeter to be covered.