The 51st, which had been in the thick of the fight all through, losing some forty-five officers and men, bivouacked that night two miles from Vittoria, and on the following day joined in the pursuit of the enemy towards Pampeluna. The Frenchmen were well on the run, and a rapid pursuit would probably have resulted in their complete dispersal, and in Wellington's immediate invasion of France. But a rapid pursuit was found to be impossible, for the reason that, as so often had been the case before, victory had proved too much for the Allies. "The night of the battle," wrote Wellington, "instead of being passed in getting rest and food to prepare the soldiers for pursuit the following day, was passed by them in looking for plunder. The consequence was that they were incapable of marching in pursuit of the enemy and were totally knocked up." Two days later, he stated that no fewer than eight thousand British soldiers were absent, and scattered all over the country marauding, and that the majority of those who remained with their regiments were under the influence of drink, so that "when marches of over twelve miles were attempted, the line of route was crowded with stragglers and men seeking admittance to hospital."

In spite of all this, Wellington started, on the morning of the 22nd June, with six divisions and the light cavalry, for Salvatierra, and on the 25th reached Pampeluna, which he immediately blockaded. After much marching about during the following few weeks, in the endeavour to clear the whole country of the enemy, the 51st assisted in driving the fugitives out of the valley of the Bastan, and then followed towards the Pyrenees, taking up a position at Echallar. During the last week of July and the first week of August the regiment came in for some sharp fighting, more especially on the heights above Ostiz, where it suffered the loss of thirty men, and again at the pass of Dona Maria. From that time until the end of August the 7th Division was occupied in watching the passes of Echallar and Zagaramurdi; but on the 30th it received sudden orders to strike tents and march to the bridge of Lesaca, for the purpose of covering the operations now in active progress against San Sebastian.

Previous to this, Marshal Soult, who had relieved King Joseph in supreme command of the French army in the Pyrenees, had reorganised his forces, and, towards the end of July, had made a bold but unsuccessful attempt to relieve the garrison of Pampeluna, being very severely handled in withdrawing to the Pyrenees, and it was in his overthrow that the 51st assisted at Ostiz, Dona Maria, and elsewhere, as mentioned above. The French marshal then took up a line of defence along the right bank of the Bidassoa, from its mouth up-stream to the village of Vera (situated at the point where the river bends almost at right angles), and onwards across the foothills and ridges of the Pyrenees to St Jean Pied de Port. In the meantime, Wellington, having disposed his troops so as to watch Soult all along the line, proceeded with the siege of San Sebastian, the great fortress standing on the sea-coast, some fifteen miles (as the crow flies) from Vera. The place was strong, well-provisioned and well-garrisoned, and Wellington was insufficiently equipped to reduce it quickly; moreover, Soult's activity necessitated the employment of large bodies of the allied army at a distance from the fortress. So much, in fact, was this the case that, towards the end of July, Wellington was obliged to utilise the services of so many of the besieging troops elsewhere that he found it necessary to convert the siege into a simple blockade. When, however, he had got rid of all these difficulties, and when Soult had been forced back, Wellington found it possible to renew the siege of San Sebastian. The heavy guns and other siege necessaries, for which he had waited for so long, having arrived from England in the middle of August, the British commander returned to the charge with all the determination for which he was ever noted. For ten days the great guns battered the walls, during which period the besiegers suffered severely from the fire of the enemy's artillery, and were constantly called upon to repel with the bayonet the sallies of the garrison. To the men in the trenches it seemed as if the capture of the place was still far off, but Wellington thought otherwise, and on the 30th August he issued orders for the assault to take place a little before noon next day, at the same time instructing the troops covering the siege to be prepared to frustrate any attempt by Soult to interfere with the operations. It was for that purpose that the 51st was despatched with all haste to the Lesaca bridge, and thence sent forward, with the rest of Inglis's brigade, to support a Portuguese brigade on the slopes of the Peña de Haya (known to the French as Mount Aya, or Les Trois Couronnes).

The 31st August was a busy day, not only at San Sebastian itself, but also with the covering troops, for, as Wellington had anticipated, Soult made a strenuous effort to interrupt the siege. The country lying within the bend of the Bidassoa, between Vera and San Sebastian, was wild and mountainous, with few roads; and within that bend the covering troops were in position facing approximately east. Three bridges spanned the river—Behobia, close to its mouth, Vera, a little above that village, and Lesaca, some three miles higher up stream. These, therefore, were the principal permanent crossings available for an attack on the Allies' position from the east, except that the Behobia bridge was broken and required to be repaired. The river also, when low, could be forded at two or three points between Vera and Behobia; and since Soult possessed a pontoon train, he could throw bridges across the river at other points. Thus the Bidassoa, in its lower course, presented but a slight obstacle to an advance, though its passage might cause delay.

Soult's design was to pass some forty thousand across the river at two different points, each body fighting its way through the mountains until Oyarzun was reached, when, the whole force having concentrated, a fresh advance was to be made towards San Sebastian, some six miles distant. Wellington had foreseen all this, and had made his dispositions accordingly, watching the lower crossings from the heights of San Marcial, and the fords and bridges about Vera from the Peña de Haya—both strong and commanding positions.

Before daylight, Reille, with eighteen thousand men, forded the river near Behobia, and attacked the Spanish force posted about San Marcial. Wellington himself arrived on the scene at the critical moment, and so inspired were the Spaniards by his presence and exhortations that they fought with the greatest valour, and succeeded in repulsing the attack—even to driving the French into the river. While this was in progress, Clausel, with twenty thousand Frenchmen, crossed by the fords near Vera and assailed the slopes of the Peña de Haya, held by the 9th Portuguese Brigade, supported by General Inglis's brigade, with which was the 51st, now commanded by Colonel Mitchell. Here the French were too strong for the defenders, who, resisting gallantly, were forced back up the slopes until they reached the 4th Division, at the foundry of San Antonio. The fight which ensued was long and bickering, and it was not until two in the afternoon that Clausel's skirmishers reached San Antonio. Meanwhile Wellington directed a portion of the Light Division from Santa Barbara across the Upper Bidassoa, to move by the Lesaca bridge, and, taking some Spanish troops with them, to reinforce Inglis. Clausel observing these movements, and fearing for the safety of his left flank and rear, halted his force and sent to Soult for orders.

The 51st lost heavily in its retirement up the slopes to San Antonio, having one officer killed and eleven officers wounded, and upwards of seventy men killed or wounded. Nor was it possible for the regiment, when forced back out of San Antonio, to take all their wounded with them, and in connection with this the following appears in the records of the 51st: "Some of the wounded had to be left behind, and they, falling into the hands of the French, discovered that the regiment with which they had been engaged was the French 51st. Pointing to the common number, the English soldiers were then received by their captors rather as distressed comrades than prisoners. Their wants were immediately attended to, their wounds dressed, and every article of their personal property carefully preserved for them. In the morning the French commenced their retreat, and left their grateful prisoners to be reclaimed by their regiment, which listened with joy to the universal story of the kindness they had experienced. 'This is the real chivalry of modern warfare, and robs it of half its horrors.'" At the time probably neither regiment knew, or remembered, that just a year before they had been in conflict at the Retiro, in Madrid, when the eagle of the French 51st had been captured. But this meeting of the British 51st with the French 51st is not without parallel in the annals of the Peninsular War, for there are other instances of the freemasonry of regimental numbers. In the 'Historical Records of the 43rd Light Infantry,' the following incident is related: "In the evening (December 12, 1813), on calling the roll of the regiment, a dozen men were reported missing, whereupon Colonel Napier despatched an officer with a sergeant and patrol in quest. The men were found in a small house filled with apples, on most amicable terms with about as many French soldiers—oddly enough, belonging to the Imperial 43rd. The same object, that of securing the tempting fruit, had impelled both parties to the spot, and all had gone on the apple raid unarmed. The French, on observing that the English bore '43' on their breastplates, examined them attentively, cordially shook hands, and expressed much pleasure in the accidental rencontre, asking many questions as to rations and allowances; and assured them that if they would accompany them to a post a little way off they would give them some first-rate brandy. Upon the appearance of the officer, the Frenchmen, believing themselves prisoners, brought forth the whole of their spoil as a peace-offering: but he merely pointed to the door, whence they effected their escape, while the English truants, with crammed haversacks, were escorted back to their quarters."

In those days the British soldier gloried in the number of his regiment, and doubtless the French soldier did so also. Under such circumstances one can easily understand that the number should have become a bond of union, even between men who when on duty were ready to bayonet one another. There is no doubt that, apart from such entente cordiale incidents as the above, the power of the regimental number was great; the traditions of the regiment were built up round its number, and when, in 1881, a civilian Secretary of State for War thought fit to substitute county titles for the old numbers, he introduced the most unpopular army reform ever devised by a War Minister. In the eyes of a civilian it may have been a small matter, but it was a bid to destroy the esprit de corps of half the army. That it did not seriously affect regiments was due to the fact that they steered a middle course, styling themselves officially by their new county titles, and unofficially retaining their ancient numbers.

But to return to the events of the 30th August 1813: while Clausel awaited Soult's orders at San Antonio, Reille had renewed the attack on San Marcial. For some hours the Spaniards continued to hold their own, but it is doubtful if they could have done so much longer, when fortunately the elements came to their aid. At about 3 P.M. there fell on the combatants one of the most violent storms ever experienced even in these lofty mountains, and the tempest of wind and rain raged for two or three hours, pinning the assailants to the ground and making further progress absolutely impossible. As darkness came on Reille succeeded in withdrawing his force across the river, but Clausel, who had now been ordered by Soult to retire from San Antonio, was less fortunate, for although he himself with two brigades succeeded in fording the Bidassoa near Vera, his lieutenant, General Vandermaesen, with the remainder of the troops, was cut off by the rising waters. His sole prospect of escape from this perilous situation was by forcing the passage of the guarded bridge a little above Vera, and this, during the dark and stormy night, he was successful in doing, though at the cost of his own life, and with the loss of nearly three hundred of his men. Soult's attempt, therefore, to interrupt the operations against San Sebastian had proved a dismal failure, and while the covering force had been employed in thus holding the French in check, the great fortress had fallen, after an assault as desperate and as bloody as that which had won Badajoz in the previous year.