palace. This early palace had an L shaped plan, an attached patio, a fortified access and the large west tower. Furthermore, the palace strengthened the most vulnerable part of the city's enclosure because it was built on the wall and next to the new entrance to the town (constructed in 1460). Between 1525 and 1550, a new wing was built that enclosed the palace courtyard and made a quadrangular building with a centralized plan, like so many other Valencian Gothic palaces. The palace courtyard was paved with river stones and had a well in the middle, a porch with pillars and above it a gallery or balcony surrounding the main floor was located. This reform is recognizable by the beam configuration and Renaissance plasterwork. Also, two fortification towers, the eastern tower and the one in the middle, were integrated into the building wall. The result of this work was that the building's orientation was redirected to the main square. These modifications transformed the building from a military fortification into a palace. Balconies were open on the main floor, weakening the military defence provided by the wall and a gallery of Roman arches was built too. In the late sixteenth and early seventeenth century, the archpriestal church of Santa Maria of Albaida was built in place of one of the palace's four wings (between 1592 and 1624). This was the occasion for the counts (marquises since 1604) to make the last major structural alteration of the building. Some old houses were knocked down to create an inner garden. As a result, the parade ground disappeared and a new wing was built next to the east tower, following the line of the wall (c. 1610). Therefore, the palace, initially a building enclosing its patio, now opens out to the main square, forming a wall between the town and the church. Due to the fact that the castle was based on the original wall, the church had remained isolated from the village, hence it was necessary to go to the west side to gain access through the only door in the town. During the years 1767–1768, the double arch was opened between the western tower and the middle one. This arch gives access to side façade of the church through a stairway. The initiative came from the landed oligarchy, who requested the marquis licence to carry out the construction. The marquis lived in