We investigate students' sense of ownership of multiweek final projects in an upper-division optics lab course. Using a multiple case study approach, we describe three student projects in detail. Within-case analyses focused on identifying key issues in each project, and constructing chronological descriptions of those events. Cross-case analysis focused on identifying emergent themes with respect to five dimensions of project ownership: student agency, instructor mentorship, peer collaboration, interest and value, and affective responses. Our within-and cross-case analyses yielded three major findings. First, coupling division of labor with collective brainstorming can help balance student agency, instructor mentorship, and peer collaboration. Second, students' interest in the project and perceptions of its value can increase over time; initial student interest in the project topic is not a necessary condition for student ownership of the project. Third, student ownership is characterized by a wide range of emotions that fluctuate as students alternate between extended periods of struggle and moments of success while working on their projects. These findings not only extend the literature on student ownership into a new educational domainnamely, upper-division physics labs-they also have concrete implications for the design of experimental physics projects in courses for which student ownership is a desired learning outcome. We describe the course and projects in sufficient detail that others can adapt our results to their particular contexts.