Controlled formation of non-equilibrium crystal structures is one of the most important challenges in crystal growth. Catalytically grown nanowires are ideal systems for studying the fundamental physics of phase selection, and could lead to new electronic applications based on the engineering of crystal phases. Here we image gallium arsenide (GaAs) nanowires during growth as they switch between phases as a result of varying growth conditions. We find clear differences between the growth dynamics of the phases, including differences in interface morphology, step flow and catalyst geometry. We explain these differences, and the phase selection, using a model that relates the catalyst volume, the contact angle at the trijunction (the point at which solid, liquid and vapour meet) and the nucleation site of each new layer of GaAs. This model allows us to predict the conditions under which each phase should be observed, and use these predictions to design GaAs heterostructures. These results could apply to phase selection in other nanowire systems.