The Battle of Inverkeithing was fought on 20 July 1651 between an English army under John Lambert and a Scottish army led by James Holborne as part of an English invasion of Scotland. The battle was fought near the isthmus of the Ferry Peninsula, to the south of Inverkeithing, after which it is named.
An English Parliamentary regime had tried, convicted, and executed Charles I, who was king of both Scotland and England in a personal union, in January 1649. The Scots recognised his son, also named Charles, as king of Britain and set about recruiting an army. An English army, under Oliver Cromwell, invaded Scotland in July 1650. The Scottish army, commanded by David Leslie, refused battle until 3 September when it was heavily defeated at the Battle of Dunbar. The English occupied Edinburgh and the Scots withdrew to the choke point of Stirling. For nearly a year all attempts to storm or bypass Stirling, or to draw the Scots out into another battle, failed. On 17 July 1651 1,600 English soldiers crossed the Firth of Forth at its narrowest point in specially constructed flat-bottomed boats and landed at North Queensferry on the Ferry Peninsula. The Scots sent forces to pen the English in and the English reinforced their landing. On 20 July the Scots moved against the English and in a short engagement were routed.
Lambert seized the deep-water port of Burntisland and Cromwell shipped over most of the English army. He then marched on and captured Perth, the temporary seat of the Scottish government. Charles and Leslie took the Scottish army south and invaded England. Cromwell pursued them, leaving 6,000 men to mop up the remaining resistance in Scotland. Charles and the Scots were decisively defeated on 3 September at the Battle of Worcester. On the same day the last major Scottish town holding out, Dundee, surrendered.