The July 1866 Stamford by-election was held on 4 May 1868. A Ministerial By-Election, this was fought following the appointment of both incumbent Conservative MPs to Ministerial positions, Robert Gasgoyne-Cecil, Viscount Cranbourne becoming Secretary of State for India and John Dalrymple-Hay as a Lord Commissioner of the Admiralty in the Third Derby-Disraeli ministry.[1][2] Both men were elected unopposed, by established convention.