The ruins of Linlithgow Palace are situated in the town of Linlithgow, West Lothian, Scotland, 15 miles (24 km) west of Edinburgh. The palace was one of the principal residences of the monarchs of Scotland in the 15th and 16th centuries. Although maintained after Scotland's monarchs left for England in 1603, the palace was little used, and was burned out in 1746. It is now a visitor attraction in the care of Historic Scotland.
A royal manor existed on the site in the 12th century. This was replaced by a fortification known as 'the Peel', built in the 14th century by occupying English forces under Edward I. The site of the manor made it an ideal military base for securing the supply routes between Edinburgh Castle and Stirling Castle. The English fort was begun in March 1302 under the supervision of two priests, Richard de Wynepol and Henry de Graundeston. The architect Master James of St George was also present. In September 1302, sixty men and 140 women helped dig the ditches; the men were paid twopence and the women a penny daily. A hundred foot-soldiers were still employed as labourers on the castle in November and work continued during the Summer of 1303.
In 1424, the town of Linlithgow was partially destroyed in a great fire. King James I started the rebuilding of the Palace as a grand residence for Scottish royalty, also beginning the rebuilding of the Church of St Michael immediately to the south of the palace: the earlier church had been used as a storeroom during Edward's occupation. Over the following century the palace developed into a formal courtyard structure, with significant additions by James III and James IV. James V, who was born in the palace in April 1512, added the outer gateway and the elaborate courtyard fountain. The stonework of the South façade was renewed and unified for James V in the 1530s by the keeper, James Hamilton of Finnart. Mary, Queen of Scots, was born at the Palace in December 1542 and occasionally stayed there during her reign. The daughter of James VI, Elizabeth of Bohemia, lived in the Palace. After the Union of the Crowns in 1603 the Royal Court became largely based in England and Linlithgow was used very little. The old North range collapsed on 6 September 1607, and the Earl of Linlithgow wrote to James VI with the news: