The Moors decided to build a fortified double gate on the eastern side of Palma, an area they called Gumara. It was a quadrangular walled compound with battlements and two gates, one outer gate and one inner gate leading to the city. The two gates at Gumara were of a similar structure to the other existing gates in the walled enclosure of ancient Madina Mayurqa.
Today, one of the gates of that wall remains, the Porta de la Gabella de la Sal, at the start of Carrer de la Mar, which gives us an idea of the size of these gateways. After the conquest of Mallorca by King Jaume I, the tower of Gumara became known as Castillo del Temple (Castle of the Temple) or simply Temple.