In 1318, Afonso Sanches (the illegitimate son of King Dinis of Portugal and Aldonça Rodrigues Telha) and Teresa Martins (daughter of João Afonso de Menez, Count of Barcelos, granddaughter of Sancho IV of Castile) and great-great-granddaughter of Maria Pais da Ribeira, founded the "Monastery of Santa Clara". Later referred to as the Convent of Santa Clara, the construction of the monastery developed from the bad relationship between King Dinis and his wife, Queen Elizabeth of Portugal, due to the king's preference for his illegitimate son. The queen re-founded, in 1314, an abandoned monastery in Coimbra, which she renamed Santa Clara. This prompted King Dinis to sponsor and authorize Afonso Sanches to build a monastery of the same invocation on the right bank of the Ave river, where an ancient Celtic hillfort was located. The cornerstone was laid in 1318, and once completed it was deposited in the hands of the Franciscan Order, which he patronized throughout his life, eventually leaving Vila do Conde, its lands and rents, in their possession after his and his wife's deaths. Today it is the of Vila do Conde. The priory became the judicial seat, with all the royal rights in the area. Yet, King Edward began to contest these grand privileges during his reign, and King John III of Portugal finally stripped them of those rights in 1537, investing his brother Edward, with the seigneurial titles. At the marriage of Catherine, his daughter, with John I, 6th Duke of Braganza, the Infante Edward passed on the title to the Royal House of Braganza. Consequently, Vila do Conde had representation in the Royal Cortes and their alcaldes were nominated for dukedoms in the Royal House of Braganza. But this was also responsible for the local government weakness and high taxes on most local economic activities, except shipping and trade, where the national government had sole control.