We report in situ trapping of a thiolated DNA duplex with eight base pairs into a polymer-protected gold nanogap device under near-physiological conditions. The double-stranded DNA was captured by electrophoresis and covalently attached to the nanogap electrodes through sulfur-gold bonding interaction. The immobilization of the DNA duplex was confirmed by direct electrical measurements under near-physiological conditions. The conductance of the DNA duplex was estimated to be 0.09 mu S. We also demonstrate the control of DNA dehybridization by heating the device to temperatures above the melting point of the DNA. (C) 2010 American Institute of Physics.