Nymphenburg Palace owes its foundation as a summer residence to the birth of the long-awaited heir to the throne, Max Emanuel, who was born in 1662 to the Bavarian Elector Ferdinand Maria and his wife, Henriette Adelaide of Savoy, after some ten years of marriage.A site on the edge of the court lands, to the west of the city and the Residenz, was chosen for the new building – a location which, at that time, was still some way out of Munich surrounded by open countryside. In 1664 construction began to the plans of the north Italian architect Agostino Barelli, who also designed Munich’s Theatine Church.Initially, the Italianate "Nymphenburg summer residence" was a mighty cubic pavilion, flanked by the court church, several outbuildings and a small, walled, geometrical garden. By 1679 the palace complex, in its first incarnation, had nearly been finished.Nymphenburg Palace acquired its present-day dimensions under the elctor Max Emanuel (reigned 1680-1726). Supervised by the court architect Henrico Zuccalli, two off-set pavilions were built on each side of the existing structure, to the north and south. Begun in 1701, the pavilions were linked with the central edifice by galleries.