similarly, it was the residence of general beresford following the peninsular warm, and during the siege of porto (1832), king peter iv used the palace as his headquarters for four months. in 1861, though, there was a promissory note to sell the palace by d. pedro v.