During the king's absence in Ireland the High Steward and Sir James Douglas managed government affairs and spent time defending the Scottish Borders. Upon the capture of Berwick-upon-Tweed from the English in 1318 he was placed in command of the town. On 24 July 1319 the town was attacked by King Edward II of England. Several of the siege engines were destroyed by the Scots' garrison and the Steward suddenly rushed in force from the town to drive off the enemy. In 1322, with Douglas and Thomas Randolph, he made an attempt to surprise the English King at Byland Abbey, near Malton, Yorkshire. Edward, however, escaped, pursued towards York by The Steward and 500 horsemen.