 Despite bombardment, attempts to undermine the walls and attacks on the gates, the city held out through May and June.Prince Rupert, sent to relieve York, approached with reinforcements, and through clever manoeuvring was able to force the besiegers to withdraw, lifting the siege on 1 July.The next day, Parliamentary forces defeated Rupert at the Battle of Marston Moor, six miles west of York, making the surrender of York and the castle inevitable.