He was shortly after directed to conduct the siege of the strong fortress of San Sebastian, which was defended with great gallantry and skill by General Rey. The first assault, which took place on 25 July, was repulsed with heavy loss, and the siege had in consequence to be raised for a time. It was renewed, however, after the defeat of Marshall Soult in the battles of the Pyrenees, and a second attempt to carry the fortress by storm was made on 31August. The breach was found to present almost insuperable obstacles, and the storming party strove in vain to effect a lodgement. In this almost desperate state of the attack, General Graham ordered a heavy fire of artillery to be directed against the curtain wall, passing only a few feet over the heads of the British troops in the breach. This novel expedient was completely successful. Taking advantage of an explosion on the rampart caused by the fire of the guns, which created confusion among the enemy, the assailants gained a footing on the wall, and after a bloody struggle, which lasted two hours, forced their way into the town.