We consider distance colourings in graphs of maximum degree at most d and how excluding one fixed cycle of length ℓ affects the number of colours required as d → ∞. For vertex-colouring and t ⩾ 1, if any two distinct vertices connected by a path of at most t edges are required to be coloured differently, then a reduction by a logarithmic (in d) factor against the trivial bound O(dt
) can be obtained by excluding an odd cycle length ℓ ⩾ 3t if t is odd or by excluding an even cycle length ℓ ⩾ 2t + 2. For edge-colouring and t ⩾ 2, if any two distinct edges connected by a path of fewer than t edges are required to be coloured differently, then excluding an even cycle length ℓ ⩾ 2t is sufficient for a logarithmic factor reduction. For t ⩾ 2, neither of the above statements are possible for other parity combinations of ℓ and t. These results can be considered extensions of results due to Johansson (1996) and Mahdian (2000), and are related to open problems of Alon and Mohar (2002) and Kaiser and Kang (2014).