Objective:To identify key school-level contexts and mechanisms associated with implementing a provincial school food and beverage policy.Design:Realist evaluation. Data collection included semi-structured interviews (n 23), structured questionnaires (n 62), participant observation at public events (n 3) and scans of school, school district and health authority websites (n 67). The realist heuristic, context + mechanism → outcome configuration was used to conduct the analysis.Setting:Public schools in five British Columbia (BC), Canada school districts.Participants:Provincial and regional health and education staff, private food vendors and school-level stakeholders.Results:We identified four mechanisms influencing the implementation of BC’s school food and beverage sales policy. First, the mandatory nature of the policy triggered some actors’ implementation efforts, influenced by their normative acceptance of the educational governance system. Second, some expected implementers had an opposite response to the mandate where they ignored or ‘skirted’ the policy, influenced by values and beliefs about the role of government and school food. A third mechanism related to economics demonstrated ways vendors’ responses to school demand for compliance with nutritional Guidelines were mediated by beliefs about food preferences of children, health and food. The last mechanism demonstrated how resource constraints and lack of capacity led otherwise motivated stakeholders to not implement the mandatory policy.Conclusion:Implementation of the food and beverage sales policy at the school level is shaped by interactions between administrators, staff, parent volunteers and vendors with contextual factors such as varied motivations, responsibilities and capacities.