During Gavin Douglas' provostship, St Giles' was central to Scotland's response to national disaster of the Battle of Flodden in 1513. As Edinburgh's men were ordered by the town council to defend the city, its women were ordered to gather in St Giles' to pray for James IV and his army. Requiem Mass for the King and the memorial mass for the dead of the battle were held in St Giles' and Walter Chepman endowed a chapel of the Crucifixion in the lower part of the kirkyard in the King's memory.