Magic state distillation (MSD) is a purification protocol that plays an important role in fault-tolerant quantum computation. Repeated iteration of the steps of an MSD protocol generates pure single non-stabilizer states, or magic states, from multiple copies of a mixed resource state using stabilizer operations only. Thus mixed resource states promote the stabilizer operations to full universality. MSD was introduced for qubit-based quantum computation, but little has been known concerning MSD in higher-dimensional qudit-based computation. Here, we describe a general approach for studying MSD in higher dimensions. We use it to investigate the features of a qutrit MSD protocol based on the five-qutrit stabilizer code. We show that this protocol distils non-stabilizer magic states, and identify two types of states that are attractors of this iteration map. Finally, we show how these states may be converted, via stabilizer circuits alone, into a state suitable for state-injected implementation of a non-Clifford phase gate, enabling non-Clifford unitary computation.