The segregation of Nasr impurities to a Σ = 5  twist boundary in SrTiO3 is studied using DFT-based plane-wave pseudopotential techniques. The formation energies of the impurities are calculated as a function of oxygen chemical potential and electron chemical potential. The results indicate a strong driving force for segregation to the boundary and that the Na impurities exhibit acceptor-like behaviour. The atomic displacements caused by the impurities are small both in the bulk and at the grain boundary. Based on the results a model is suggested in which Nasr segregation is driven by soft relaxation of the electronic structure.