Objective: To evaluate rates of anxiety, depression and stress, as well as associated factors and changes in habits, among students of human medicine from the Universidad Nacional San Cristóbal de Huamanga [San Cristóbal of Huamanga University] (UNSCH), located in Ayacucho (Peru), in the context of the COVID-19 pandemic. Methods: A cross-sectional study was conducted through a virtual survey. The Depression Anxiety Stress Scale-21 (DASS-21) was used. To evaluate associated factors, prevalence ratios (PR) were estimated using Poisson regression with robust variance. Results: A total of 284 surveys were analysed (48.2% women; median age 22 years). Rates of (at least moderate) depression, anxiety and stress were 24.3%, 28.5% and 13.0%, respectively. Adjusted analyses found that having completed fewer years of study, being Catholic and having a chronic disease were associated with a higher rate of anxiety, while being of a younger age was associated with a higher rate of stress. The students reported mostly decreased physical activity, as well as increased Internet and social media use, hours of sleep, hours spent in front of a screen, food intake, and weight, during the COVID-19 pandemic. Conclusions: In the context of the pandemic, despite the changes in habits described, rates of depression, anxiety and stress were lower than in previous studies in students in the health sciences. The higher rate of anxiety was associated with being in an earlier academic year, Catholicism and chronic diseases, while the higher rate of stress was associated with being of a younger age.