Vertices arrive sequentially in space and are joined to existing vertices at random according to a preferential rule combining degree and spatial proximity. We investigate phase transitions in the resulting graph as the relative strengths of these two components of the attachment rule are varied. Previous work of one of the authors showed that when the geometric component is weak, the limiting degree sequence mimics the standard Barabási-Albert preferential attachment model. We show that at the other extreme, in the case of a sufficiently strong geometric component, the limiting degree sequence mimics a purely geometric model, the on-line nearest-neighbour graph, for which we prove some extensions of known results. We also show the presence of an intermediate regime, with behaviour distinct from both the on-line nearest-neighbour graph and the Barabási-Albert model; in this regime, we obtain a stretched exponential upper bound on the degree sequence.