The present study explores how school improvement in combination with a teacher professional development (TPD) project influenced the implementation of education for sustainable development (ESD) in five Swedish schools, when employing a whole school approach. Interviews were conducted with three teachers from each school. Shulman and Shulman's four forms of capital for capacity building were used as a framework for the data analysis. The impact of the project on the schools' pedagogical activities varied considerably between the schools. The transformative potential in ESD was realized to a greater extent in the schools characterized by high levels of moral capital - i.e. trust - than in the schools characterized by more individual and traditional ways of working. Three general conclusions concerning ESD implementation are drawn: 1) Prior to launching a whole school project for ESD, it is desirable to make an inventory of the capacity building capital at participating schools, and to identify contextual factors constituting external pressure on the building of capital. 2) The school improvement project and the TPD need to be locally adjusted to the available capital. 3) A strategy for adapting the project to the various external pressures needs to be developed.