The royal and baronial parties now both began preparations for war. In March, Gaveston settled at Scarborough, and began to fortify the castle. Around the same time, he was pronounced excommunicate by Archbishop Winchelsey at St Paul's. At the same meeting the barons – under the leadership of Lancaster – divided up the realm to oppose the King. Pembroke and Warenne were given the responsibility of capturing Gaveston. On 4 May, the King and Gaveston were at Newcastle, and barely escaped a force led by Lancaster, Henry Percy and Robert Clifford. Gaveston then returned to Scarborough, while the King left for York. Scarborough was soon besieged by Pembroke, Warenne, Percy and Clifford, and on 19 May Gaveston surrendered to the besiegers. The terms of the surrender were that Pembroke, Warenne and Percy would take Gaveston to York, where the barons would negotiate with the king. If an agreement could not be reached by 1 August, Gaveston would be allowed to return to Scarborough. The three swore an oath to guarantee his safety. After an initial meeting with the King in York, Gaveston was left in the custody of Pembroke, who escorted him south for safekeeping.