The isolation of morphine ('principium somniferum') by Friedrich Wilhelm Sertürner about 200 years ago is generally accepted as the beginning of scientific phytochemistry (plant secondary products research). For about 150 years this research addressed almost exclusively the isolation and structure elucidation of new plant products. It had great impact on the development of modern organic chemistry and pharmaceutical industry and provided the chemical basis for biological research on plant secondary metabolism, which began about 50 years ago. The historical development of this field to its present state of knowledge will be considered in this review from three angles of vision: mechanistic, functional and evolutionary perspectives. Mechanistic research started on the metabolite level and was initiated by the availability of radioactive nuclides in the early 1950s. By means of sophisticated tracer techniques, the biosynthetic routs of most secondary pathways were outlined and provided the basis for the enzymatic characterization of biosynthetic pathways in the 1970s and 1980s, followed by the identification of the corresponding genes beginning in the late 1980s. During this 50-year period of intensive research a change of paradigm occurred addressing the question: why do plants synthesize this immense rich diversity of secondary metabolites comprising more than 200,000 structures? For a long time regarded as waste products or assigned with various other attributes their indispensable role as components of the survival strategy of plants in a mostly hostile environment appears now generally accepted. Along with the great progress in the field of chemical ecology, the emerging field of molecular evolution provided crucial evidence that during evolution of secondary metabolism genes encoding enzymes of plant's primary metabolism were duplicated, recruited and diversified for new functions under the everlasting and continuously changing selection pressure of the environment.