The Sternberg Palace on Hradčanské náměstí is an important Baroque landmark, commissioned, like Trója Chateau, by Count Václav Vojtěch of Šternberk and his wife Klára of Maltzan.
The palace ground plan was designed by Domenico Martinelli sometime after 1697, originally under the assumption that the building site would extend as far as Hradčanské náměstí. We have documentation of the involvement of Kryštof Dientzenhofer in the construction at around the turn of the century, and of Giovanni Battista Alliprandi in the final phase of construction.
In 1811 the Society of Patriotic Friends of Art purchased the palace from Leopold of Šternberk, and the palace underwent subsequent renovation for exhibition purposes until 1819. The Society's collections were opened to the public in 1814. In 1871 the Society sold the palace to landowner Heliodor Heidl. He in turn sold it in the following year to the Saint Anne Ladies and Girls Association, which commenced operation of a so-called "Institute for Idiots", called the Ernestinum in honour of association chairwoman Ernestina Auersperk. In 1919 the building was commandeered for the needs of the Ministry of National Defence and a commissary school was established. Under the Protectorate, after the abolition of the Saint Anne Ladies and Girls Association, the palace was acquired by the Congregation of Scholastic Sisters of the Third Order of Saint Francis Serafíno. However this organisation neither moved into the palace nor undertook any activities in it, as government troops were stationed there. After the Second World War the Ministry of National Defence gradually returned to the premises together with the Office of the Disciplinary Committee. The National Gallery began to use and renovate the palace in 1946.
The second-floor stucco work done by Giuseppe Donato Frissoni in 1707 - a year before the palace construction was completed - is worthy of note. Two ceiling paintings, the work of Michael Wenceslas Halbax depict the suicide of Queen Dido and the mourning ruler Artemis. Illusive ceiling frescoes in the Antique and Chinese rooms are the work of Swiss artist Johann Rudolf Bys (1662-1738), while the walls of the latter were decorated in the chinoiserie style by Jan Vojtěch Kratochvíl (1667-1721).