Steady axisymmetric flows in geostrophic and cyclostrophic balance under gravity are considered for the three-dimensional Euler equations (with the spherical geopotential approximation but without the shallow-atmosphere and ‘traditional’ approximations). The key to analytical specification of these flows is a compatibility condition involving the zonal flow and temperature fields. This condition is a generalization of the thermal wind equation for balanced zonal flow governed by the hydrostatic primitive equations. Two examples are presented in which the temperature field is specified as non-separable two-parameter functions of latitude and height, and corresponding zonal flows are derived analytically. Such flows extend the class of known analytical solutions of the governing equations, and their usefulness in numerical model development and testing is the focus of this study. © Crown Copyright 2008. Reproduced with the permission of the Controller of HMSO. Published by John Wiley & Sons, Ltd.