Dalkeith Castle was located to the north east of Dalkeith, and was originally in the hands of the Clan Graham in the 12th century and given to the Clan Douglas in the early 14th century. James Douglas of Dalkeith became the Earl of Morton in the mid 15th century. The castle was strategically located in an easily defensible position above a bend in the River North Esk.
In 1642, Dalkeith Castle was sold by the Douglas family to Francis Scott, 2nd Earl of Buccleuch. The 2nd Earl of Buccleuch's daughter married the Duke of Monmouth, eldest illegitimate son of King Charles II. They became the Duke and Duchess of Monmouth & Buccleuch. After the Duke of Monmouth had been executed for treason, Anne Scott, 1st Duchess of Buccleuch, his widow, who held the Scottish title in her own right, asked architect James Smith to use William of Orange's Palace of Het Loo in the Netherlands as a model for the new Dalkeith Palace.
Smith and his cousins, Gilbert and James, signed the contract for mason work at Dalkeith Castle in March 1702. Construction of Dalkeith Palace began later that year, Smith deciding to incorporate a portion of the tower house of the old castle into the western side of the new structure. The outline of the old tower walls is still visible in the western facade of the palace today.
The 5th Duke of Buccleuch considered extensive rebuilding in 1831 and William Burn produced unexecuted designs in Jacobean style. More minor alterations were carried out, together with improvements to the surrounding estate including a new house and offices for the Duke's Chamberlain, and the construction, for the 5th Duke, of St Mary's Church as a private chapel by William Burn and David Bryce. The church contains one of only two water-powered organs in Scotland.
References:The Clementinum is a historic complex of buildings in Prague. Until recently the complex hosted the National, University and Technical libraries, the City Library also being located nearby on Mariánské Náměstí. The Technical library and the Municipal library have moved to the Prague National Technical Library at Technická 6 since 2009. It is currently in use as the National Library of the Czech Republic.
Its history dates from the existence of a chapel dedicated to Saint Clement in the 11th century. A Dominican monastery was founded in the medieval period, which was transformed in 1556 to a Jesuit college. In 1622 the Jesuits transferred the library of Charles University to the Klementinum, and the college was merged with the University in 1654. The Jesuits remained until 1773, when the Klementinum was established as an observatory, library, and university by the Empress Maria Theresa of Austria.