Context. Cannabis is a herbaceous annual plant that belongs to the Cannabaceae family, which is used in the production of fibre, paper, oil and pharmaceutical products.Aims. The aim of this study was to identify drought-tolerant ecotypes and medicinal and industrial populations.Methods. Due to the medicinal and industrial importance of cannabis, 12 cannabis ecotypes were collected from different regions of Iran. Then, their agronomic and phytochemical characteristics were evaluated under different soil moisture conditions.Key results. The soil moisture levels had significant effects (P < 0.01) on the studied traits except for the 1000 seed weight. Based on duration of the growth period, the Tabas and Dasht-e-Moghan ecotypes were identified as early and late maturing ecotypes, respectively. Also, the highest stem dry weight and stem height/diameter ratio and the lowest seed yield were related to the Dasht-e-Moghan ecotype, which is valuable for fibre production. Based on seed yield (relative reduction) and some tolerance indexes, the Tabas and Tabrize ecotypes were shown to be the most tolerant and sensitive ecotypes, respectively. As soil moisture decreased, tetrahydrocannabinol levels increased and cannabidiol levels decreased. The highest amount of tetrahydrocannabinol was related to the Qom ecotype at 50% soil moisture and the highest amount of cannabidiol was related to the Rasht ecotype at 100% soil moisture.Conclusions. Generally, these ecotypes had different responses to soil moisture. Some ecotypes were valuable in terms of the production of pharmaceutical metabolites and some in terms of fibre production.Implications. Tolerant and sensitive ecotypes might be considered in production and also breeding programs.