Due to comprehensive social distancing measures related to the COVID-19 pandemic, medical faculties worldwide have made a virtue of necessity in resorting to online teaching. Medical faculties grapple with how to convey clinical competencies to students in this context. There is a need for research not only to map but also to explain the effect of these secondary measures on students' learning and mental wellbeing. During a period of ongoing comprehensive social distancing measures in Germany, we translated a competency-based curriculum including obstetrics, paediatrics, and human genetics to an e-learning course based on online patient and teacher encounters. In our qualitative study on students' and teachers' views, we identify potential enablers and drivers as well as barriers and challenges to undergraduate medical education under lockdown. In summer 2020, we conducted six focus group interviews to investigate medical students' and teachers' perspectives, experiences and attitudes. All focus groups were videotaped, transcribed verbatim and coded. To guide our deductive and inductive analysis, we applied the theoretical framework of Regmi and Jones. Content analysis was performed in a multi-perspective group. We identified five major themes contributing to a successful use of clinical competency-based e-learning under lockdown: Communication (with teachers, students, and patients), Mental wellbeing, Structure and self-organization, Technical issues, and Learning and commitment. We discuss enablers and potential barriers within all themes and their overlap and link them in an explanatory model. In our setting, students and teachers find e-learning holds strong potential and especially in times of COVID-19 it is greatly appreciated. We broaden the understanding of the impact of distant learning on acquiring competencies, on attitudes, and on mental wellbeing. Our model may serve for a thoughtful, necessary transition to future e-learning and hybrid programs for a competency-based medical education with ongoing social distancing measures.