The history of the discovery of technetium is reviewed within the framework of the discovery and production of artificial radioactivity in the twentieth century. Important elements of this history are the accidental production of this element in a cyclotron in Berkeley, California, USA, a machine devised by Ernest Orlando Lawrence, and its subsequent discovery in 1937 by Carlo Perrier and Emilio Segrè in scrap metal parts sent by Lawrence to Palermo, Italy by mail. A detailed account is given of the steps taken; the history of the later discovery of the technetium-99m isotope in 1938 is likewise examined. Sources of natural and artificial technetium are briefly discussed.