Context: Coordinating a software project across distances is challenging. Even without geographical and time zone distances, other distances within a project can cause communication gaps. For example, organisational and cognitive distances between product owners and development-near roles such as developers and testers can lead to differences in understanding and interpretation of the business requirements. Applying good software development practices, known to enhance alignment and coordination within development projects, can alleviate these challenges. Objective: The aim of our research is to identify and describe underlying factors which can explain why certain practices support aligning and coordinating software development projects. Method: We have inductively generated a theory analysing empirical data consisting of 15 interviews from 5 different companies. The systematic and iterative analysis was based on an initial hypothesis that distances affect development, and on results from previous research. Results: We present a theory of distances that explains how practices improve the communication within a project by impacting distances between people, activities and artefacts. We also present a theoretical model of how specific alignment practices affect different types of distances. Conclusions: The results provide a basis for further research and can be used by software organisations to improve on software practice. (C) 2015 Elsevier B.V. All rights reserved.