Linlithgow has been a Royal Burgh since David I built a hunting lodge on the site of Linlithgow Palace in the 1100s. Being situated halfway between the castles at Edinburgh and Stirling, it was an ideal location for an overnight stay, saving the monarch the bother of returning to either of the castles after a long day's hunting. The lodge was later fortified and occupied by Edward I of England during the Wars of Independence, securing supply routes between Edinburgh and Stirling. The present palace was begun by James I in 1424, with subsequent additions by James III, James IV and James V. Mary Queen of Scots was born in the Palace in 1524. Royalty left the Palace in 1603 when James VI moved his court to London following the Union of the Crowns, celebrated in the ornate fountain at the Cross in front of the Palace. The last of the Stewarts to stay at the Palace was Charles I, who spent the night in 1633. It was again occupied, this time by Oliver Cromwell in 1649, as he attempted to force Scotland into his English Commonwealth. When Bonnie Prince Charlie arrived on his way south to Edinburgh after arriving in Scotland in 1745, the fountain in the courtyard was made to flow with wine in his honour. But it was set alight by the troops of the Duke of Cumberland following their defeat by the Jacobites at the Battle of Falkirk in January 1746.