The use of plant extracts such as essential oils (EOs) as botanical pesticides has numerous advantages, including the high effectiveness against a wide range of diseases and pest insects of agricultural and medicinal importance due to multiple mechanisms of action. EOs belong to secondary plant metabolites, which mediate direct and indirect plant defenses against biotic and abiotic stress conditions. The main objective of this thesis was to obtain plant extracts from aromatic plants, which can be used as bio-based plant protection products. The general hypothesis investigated whether a) the content of biologically active substances of two Iranian medicinal plants species (Ferula assa-foetida and Zataria multiflora) originated from a wide range of extreme environments is correlated with certain environmental factors; whether b) certain secondary plant metabolites from F. assa-foetida and Z. multiflora can be used as biologically active compounds against fungal infestations in crops; and whether c) the production of these metabolites can be artificially increased by mimicking extreme environmental conditions during cultivation. a) First of all this study evaluated whether environmental factors can be utilized to predict the presence of specific compounds from medicinal plants by two different methods, near-infrared spectroscopy (NIRS) and gas chromatography coupled mass spectrometry (GC−MS). Using an environmental metabolomics approach (GC−MS), on the basis of EOs from roots, three distinct chemotypes were found among 10 Ferula assa-foetida L. populations. These were characterized by (I) monoterpenes and Z-1-propenyl sec-butyl disulfide; (II) eudesmane sesquiterpenoids and α-agarofuran; (III) Z- and E-1-propenyl sec-butyl disulfide. NIRS measurements indicated a similar, but less distinct pattern. Structural equation models (SEMs) showed that EO compounds and content were directly influenced by edaphic factors and temperature (chapter 2). Essential oil compounds from leaves of 14 populations of Z. multiflora were classified into three main groups, each representing a distinct chemotype with linalool, thymol and carvacrol as the major components. Corresponding to the phytochemical cluster analysis, the hierarchical cluster analysis based on NIR data also recognized the carvacrol, thymol and linalool chemotypes. The SEMs approach revealed direct effects of soil factors and mostly indirect effects of latitude and altitude on EO compounds and content of Z. multiflora populations. Therefore, predicting EO compounds or chemotypes by environmental metabolomics can be used in medicinal plants to select populations with the desired chemical profile (chapter 3). b) Due to increasing demand of natural compounds for food preservatives and plant pathogen control, plant extracts with bioactive secondary metabolites can be used as an effective and ecofriendly plant protection approach. Hydroalcoholic extracts and EOs of Z. multiflora were assessed to identify biologically active compounds and/or chemotypes against the plant pathogens Fusarium culmorum, Fusarium sambucinum, Botrytis cinerea, Alternaria dauci and Colletotrichum lindemuthianum (chapter 4 and 5). On the basis of non-volatiles compounds of Z. multiflora hydroalcoholic extracts analyzed by LC−MS, three major chemical classes were found among the 14 populations. A total of 32 metabolites were annotated including flavonoid conjugates, hydroxycinnamic acid derivatives and phenolic terpenes. Flavonoids were the main compounds in the extracts, considering that two third of the annotated compounds represent flavonoid conjugates. The antifungal activity of extracts from Z. multiflora populations showed high variability from weak (≤ 37 %) to high inhibition rates (up to 65 %). Nine compounds such as dihydroquercetin, dihydrokaempferol, naringenin and eriodictyol strongly positively correlated with antifungal activity (chapter 4). Corresponding to the single volatile compounds, even low concentrations of the carvacrol and thymol, but not of the linalool chemotype EOs inhibited significantly the growth of all fungal pathogens. Bioassays revealed positive correlation between relative amounts of p-cymene, γ-terpinene, thymol and carvacrol and the inhibition of the fungal mycelium growth, whereas myrcene and linalool relative amounts had a strong negative correlation with antifungal activity (chapter 5). c) To enhance the production of biologically active metabolites, carvacrol and linalool chemotypes of Z. multiflora were cultivated under extreme environmental conditions including UV-A radiation, heat and drought stresses. Although no significant differences were observed in extracted volatile compounds in UV-A irradiated plants, the relative content of linalool was slightly reduced in the linalool chemotype, whilst the relative amount of carvacrol was slightly increased. Drought stress alone did not alter the relative contents of volatile compounds in both chemotypes, whilst high temperatures lead to a decrease of the linalool content and an increase of the relative amount of carvacrol in the linalool chemotype. Furthermore, the interaction of drought and heat induced changes in plants of the linalool chemotype resulting in higher relative amounts of carvacrol and lower relative amounts of linalool. Moreover, the main volatile compounds of plants from the carvacrol chemotype did not change in response to abiotic stresses (chapter 5). Understanding the effect of environmental conditions on populations and chemotypes of medicinal plants supports the development of natural and sustainable fungicides or insecticides. Although several hypotheses and questions have been developed and tested or answered in this study, further studies are needed to gain deeper insight into the bioactive metabolite biosynthesis of Z. multiflora. We have to study further, how severe stress conditions affect different chemotypes of F. assa-foetida and other medicinal and aromatic plant species.