and became lieutenant-colonel of Lanark's regiment. On the surrender of Charles I to the Scottish army before Newark in May 1646, he was introduced to the king, who knighted him. Charles sent him, after the defeat of Montrose at Philiphaugh in September, to the Duke of Hamilton to obtain his influence in procuring as favourable terms as possible for Montrose, but the latter had meanwhile made his escape. Lockhart served in the army of the ‘engagement’ in the following year, and, as colonel of Lanark's regiment, was sent forward in advance to protect the western borders and Carlisle. At the battle of Preston he was ‘trod down from his horse with great danger of his life’ (Sir James Turner, Memoirs), but nevertheless rendered valuable service in protecting the rear during the retreat to Wigan, where his regiment joined the main army. Subsequently he was compelled to surrender to General Lambert, and was sent a prisoner to Newcastle, whence he obtained his liberty, on payment of 1,000l., a year later. At the time of the recall of Charles II in 1650, Lockhart was appointed general of horse, but when Argyll contrived that Baillie and Montgomery should be joined with him in the command, he resigned his commission, and retired to his seat. He returned to the camp as soon as the march into England was determined on, and offered himself as a volunteer, but Charles ignored his offers. He is said to have withdrawn, exclaiming that ‘no king on earth should treat him in this manner.’ He was not present, as is sometimes stated, at the defeat at Worcester. Lockhart soon linked his fortunes to those of the Protector. While on a visit to London he had an interview with Cromwell, and on 18 May 1652 he was appointed one of Cromwell's commissioners for the administration of justice in Scotland. He was also nominated a trustee for the disposing of forfeited estates, and was sworn a member of the Scottish privy council. On 2 July 1654 he married, as his second wife, Robina, daughter of John Sewster of Weston, Huntingdonshire, and a niece by her mother of Cromwell. In 1653, 1654–5, and 1656–8 he represented Lanark in parliament.
Lockhart was appointed in December 1655 English ambassador in Paris, but did not set out till April 1656. He filled this office till the death of Cromwell. His own correspondence, printed in the ‘Thurloe State Papers,’ supplies a full record of his diplomatic proceedings, and bears very flattering testimony to his power of will and diplomatic ability. The special purpose of his mission was to confirm the alliance with France against Spain, and to prevent the affording of protection or aid to the Stuart family. An alliance with England was distasteful to France, both on political and religious grounds; and Lockhart had a difficult task in maintaining it. Much of his success was due to his ‘marvellous credit and power’ with the Cardinal Mazarin (Clarendon, iii. 775), whose wiles and subterfuges were no match for Lockhart's straightforward decision. On 23 March 1656–7 a new offensive and defensive treaty was signed, by which France was to contribute twenty thousand men, and England, in addition to her fleet, six thousand, to carry on the war against Spanish Flanders. It was further agreed to attack the three coast towns of Gravelines, Mardyke, and Dunkirk, the first of which was to fall to France and the two others to England. With the signing of the treaty Lockhart's difficulties only commenced, but his remonstrances at last induced the French to lay siege in September to Mardyke, which was taken and handed over to the English before the end of the month. Lockhart urged on Turenne the necessity of proceeding immediately to the siege of Dunkirk, but this was delayed till June 1658, by which time the Spaniards had strongly entrenched their position. On the death of Reynolds, the English general, Lockhart undertook the command of the English forces, and in the pitched battle before Dunkirk he ‘charged the Spanish foot, and after a good resistance broke and routed them’ (ib. p. 856). The town was surrendered on 15 June, and on the 24th handed over to Lockhart, who was made governor by Cromwell, and proceeded to put it in a state of defence. He received no assistance from the French, and he was ‘forced to buy the very pallisades of the Port Royal,’ otherwise the French would have pulled them up (Thurloe, vii. 173). Shortly after the capture of Dunkirk, Lockhart interfered successfully for the protection of the Huguenots in Nismes (Burnet, p. 50; Clarendon, iii. 868).
After the resignation of Richard Cromwell Lockhart was continued by the Commonwealth ambassador in France, ‘as a man who could best cajole the cardinal, and knew well the intrigues of the court’ (Clarendon, iii. 882). He took part as the English plenipotentiary in the negotiations which resulted in the treaty of the Pyrenees, and immediately on its conclusion went to England, where he had an interview with Monck, and ‘took all the pains he could to penetrate into his designs’ (Burnet, p. 57). Monck assured him that he intended to support the Commonwealth, and Lockhart