After this decisive victory he accompanied the army in the advance to Madrid, and from thence to Valladolid and Burgos. He was present at part of the siege of Burgos, and soon after was appointed permanent assistant quartermaster-general with the rank of major. In the retreat from Burgos he rendered very important services through his knowledge of the country, which was considered of so much value that Sir H. Clinton asked for his return to the sixth division, but it was decided that he should remain at headquarters. Major Bainbrigge continued to hold the same position till the end of the war in 1814, and surveyed and sketched the country through which the army passed till it entered France. He was present at the battles of Vittoria and Pyrenees, at the last siege of San Sebastian, and at the battles of Nive and Toulouse. Rewards and distinctions were not lavishly bestowed in those days, and, as Major Bainbrigge had not been in action as the head of his department with a division, but under his seniors at headquarters, he did not receive the gold medal, and could not become a companion of the Bath. Through some strange omission he was not recommended for brevet rank, but on 21 Jan. 1817 this was rectified, when he was promoted to the brevet rank of lieutenant-colonel.