Transition-metal oxynitrides with perovskite-type structures are an emerging class of materials with optical, photocatalytic, dielectric and magnetoresistive properties that may be sensitive to oxide-nitride order, but the anion-ordering principles were unclear. Here we report an investigation of the representative compounds SrMO2N (M = Nb, Ta) using neutron and electron diffraction. This revealed a robust 1O/2(O0.5 N 0.5) partial anion order (up to at least 750 °C in the apparently cubic high-temperature phases) that directs the rotations of MO4 N2 octahedra in the room-temperature superstructure. The anion distribution is consistent with local cis-ordering of the two nitrides in each octahedron driven by covalency, which results in disordered zigzag M-N chains in planes within the perovskite lattice. Local structures for the full range of oxynitride perovskites are predicted and a future challenge is to tune properties by controlling the order and dimensionality of the anion chains and networks. © 2011 Macmillan Publishers Limited. All rights reserved.