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:
Glimmingehus is the best preserved medieval stronghold in Scandinavia. It was built 1499-1506, during an era when Scania formed a vital part of Denmark, and contains many defensive arrangements of the era, such as parapets, false doors and dead-end corridors, 'murder-holes' for pouring boiling pitch over the attackers, moats, drawbridges and various other forms of death traps to surprise trespassers and protect the nobles against peasant uprisings. The lower part of the castle's stone walls are 2.4 meters (94 inches) thick and the upper part 1.8 meters (71 inches).
Construction was started in 1499 by the Danish knight Jens Holgersen Ulfstand and stone-cutter-mason and architect Adam van Düren, a North German master who also worked on Lund Cathedral. Construction was completed in 1506.
Ulfstand was a councillor, nobleman and admiral serving under John I of Denmark and many objects have been uncovered during archeological excavations that demonstrate the extravagant lifestyle of the knight's family at Glimmingehus up until Ulfstand's death in 1523. Some of the most expensive objects for sale in Europe during this period, such as Venetian glass, painted glass from the Rhine district and Spanish ceramics have been found here. Evidence of the family's wealth can also be seen inside the stone fortress, where everyday comforts for the knight's family included hot air channels in the walls and bench seats in the window recesses. Although considered comfortable for its period, it has also been argued that Glimmingehus was an expression of "Knighthood nostalgia" and not considered opulent or progressive enough even to the knight's contemporaries and especially not to later generations of the Scanian nobility. Glimmingehus is thought to have served as a residential castle for only a few generations before being transformed into a storage facility for grain.
An order from Charles XI to the administrators of the Swedish dominion of Scania in 1676 to demolish the castle, in order to ensure that it would not fall into the hands of the Danish king during the Scanian War, could not be executed. A first attempt, in which 20 Scanian farmers were ordered to assist, proved unsuccessful. An additional force of 130 men were sent to Glimmingehus to execute the order in a second attempt. However, before they could carry out the order, a Danish-Dutch naval division arrived in Ystad, and the Swedes had to abandon the demolition attempts. Throughout the 18th century the castle was used as deposit for agricultural produce and in 1924 it was donated to the Swedish state. Today it is administered by the Swedish National Heritage Board.
On site there is a museum, medieval kitchen, shop and restaurant and coffee house. During summer time there are several guided tours daily. In local folklore, the castle is described as haunted by multiple ghosts and the tradition of storytelling inspired by the castle is continued in the summer events at the castle called "Strange stories and terrifying tales".