On the surface of the Sun, magnetic flux elements collect in regions of converging flow, grow in field strength and become pores, which have been observed to exhibit nonaxisymmetric structure over a range of scales. Around a fully developed sunspot, as well as the fine scale of the penumbra, the moat sometimes shows clearly observable spoke-like structure at low azimuthal wavenumbers. We investigate the formation of azimuthal structure by computing the linear stability properties of fully nonlinear axisymmetric magnetoconvection, which takes the form of a central flux tube surrounded by a convecting field-free region. We find steady and oscillatory instabilities with a preferred azimuthal wavenumber. The unstable modes are concentrated in the convecting region close to the outer edge of the flux tube. The instability is driven by convection, and is not a magnetic fluting instability.