We report on the formation of a metal-molecule complex that can be used as a molecular switch. Using a cryogenic scanning tunneling microscope, a covalent bond was formed reversibly between a gold atom and a perylene-3,4,9,10- tetracarboxylic dianhydride molecule supported by a thin insulating film. The bonded and the nonbonded state of the complex were found to be associated with different charge states, and the switching between the two states was accompanied by a considerable change in the tunneling current. Atomic force microscopy molecular imaging was employed to determine precisely the atomic structure of the complex, and the experimental results were corroborated by density functional theory calculations. © 2010 The American Physical Society.