The Queluz National Palace is a Portuguese 18th-century palace located at Queluz, a freguesia of the modern-day Sintra Municipality, in the Lisbon District. One of the last great Rococo buildings to be designed in Europe, the palace was conceived as a summer retreat for Dom Pedro of Braganza, later to become husband and then king consort to his own niece, Queen Maria I. It served as a discreet place of incarceration for Queen Maria as her descent into madness continued in the years following Dom Pedro's death in 1786. Following the destruction by fire of the Ajuda Palace in 1794, Queluz Palace became the official residence of the Portuguese prince regent, John VI, and his family and remained so until the Royal Family fled to Brazil in 1807 following the French invasion of Portugal..