The preparations for the assault had been observed by the Irish, and they were in readiness to receive it. The news had spread through the town, and the excitement among the whole population was intense. The guns on the walls ceased firing, in order that all might be ready to pour in their shower of balls, when the assault commenced. The fire from the batteries of the besiegers had also died away, and a silence, which seemed strange after the constant din of the preceding days, hung over the camp and city.

No sooner had the grenadiers leaped from the trenches, than the guns on the walls, and the musketry of the defenders, poured their fire upon them; while all the batteries of the besiegers opened, at the same moment, to cover the assault. Through the hail of fire the grenadiers kept on without faltering, and, as they neared the breach, the Irish rushed out through the opening to meet them. There was a desperate struggle, half hidden from the eyes of those on the walls by the cloud of smoke and dust, which arose from the combatants; but the grenadiers, fighting with the greatest gallantry, won their way to the counter-scarp, and half the regiment forced its way through the breach and entered the town. But the Irish troops, clustered behind the wall, then closed in again, and barred the breach to those following.

The Dutch and English regiments were marched up, to aid the rest of the grenadiers to cut their way in after their comrades; but these troops were unable to imitate the valour of the grenadiers. They got as far as the counter-scarp; but the fire from the walls was so deadly, that they could not be prevailed upon to advance. The rain of fire mowed them down. Their officers urged them on, and, unwilling to retreat and incapable of advancing, they were shot down in scores.

Presently there was a sudden movement among the Irish defenders on the breach, and a few of the grenadiers who had entered the city burst their way through them, and rejoined their comrades. No sooner had they entered the city, than they found themselves assailed on all sides. The Irish troops and the citizens attacked them with fury, and even the women, animated by the deadly hate which the deeds of William's soldiers had excited, hurled missiles upon them from the windows, and even joined in the attacks upon them in the streets.

The grenadiers resisted obstinately, but they were gradually overpowered by numbers, until at last a few survivors, gathering together, burst through their assailants, and succeeded in making their retreat. For nearly three hours this furious conflict had raged within the city. Regiment after regiment had been marched up to the assault, but none had proved brave enough to fight their way up the counter-scarp to the aid of the hard-pressed grenadiers in the town.

When the little remnant of the grenadiers rejoined them, they continued, for a time, to keep up a constant fire upon the defenders on the walls, but at last slowly and sullenly fell back to their camp.

In the meantime, a regiment of Brandenburghers had attacked the wall of the battery known as the Black Battery, whose fire was doing great execution upon the assailants. They had brought scaling ladders with them, and with these they succeeded, fighting with great bravery and determination, in gaining the walls. The whole regiment poured in; but, just as they did so, the Irish fired the powder magazine that supplied the battery, and the whole battalion was destroyed.

William, from his position on a fort known as Cromwell's Fort, watched the struggle. Had he acted as Cromwell did, at the siege of Drogheda, when, after his troops had been twice repulsed at the breach, he placed himself at their head and led them to the assault, the result might not have been the same; for the regiments, which refused to follow their officers up the counter-scarp, might have followed the king; but William, although he had often proved the possession of no ordinary courage, and coolness in danger, had not that species of courage which prompts a man to throw himself forward to lead a forlorn hope. Moreover, both as a general-in-chief and king, his place was not at the head of an assault.

The assailants lost more than two thousand men, and these the flower of William's army. The surprise of the troops, at their defeat by an enemy they had been taught to despise, was extreme, and so ashamed were they of their failure, that the following day they were ready to renew the assault. The king, however, would not risk another such defeat. The bravest of his force had perished, his stores of ammunition were nearly exhausted, and the rains had set in with great violence.

On the day following the assault, the king called a council of war, and it was resolved to raise the siege. There was a great scarcity of waggons and horses, in consequence of the loss sustained by Sarsfield's attack on the train. The few waggons which remained were not enough to convey the wounded men, many of whom were obliged to walk. The stores had, therefore, to be abandoned for want of transport. Some were thrown into the river, others blown up and destroyed, and, on Saturday the 30th of August, the army commenced its retreat.