ABSTRACTSupporting student participation and learning in STEM involves motivating students to engage in the most effective learning activities. In this article, we study how student motivation interacts with learning activities, and we pay special attention to active learning and the Scandinavian context where participation in learning activities is largely voluntary. Twenty‐one undergraduate physics students at a large, research‐intensive university in Norway participated in nine focus group interviews at the beginning and end of the spring term of 2020. With self‐determination theory as a lens, our thematic analysis resulted in three themes: First, students' autonomous motivation came from mastery experiences and perceived learning, such as the joy of solving a problem. Second, active learning activities enabled students' autonomous motivation when these activities supported competence, for example through optimal challenge or with evident learning gains. In contrast, students experienced low or controlled motivation when excessive challenge and lack of mastery threatened their sense of competence. Third, students' sense of competence was strengthened by being part of a community of learners. The community ensured that help and mastery experiences were available, and interactions with the community made evident that other students struggle too. The emphasis on mastery and competence for these students is discussed considering how physics is associated with difficulty and extraordinary cleverness. We argue that the main threat for students who do not feel competent enough in physics is the threat of not belonging in physics due to this perceived lack of competence. Implications for teaching and research are discussed.