Previous numerical studies have shown that the ‘ultimate regime of thermal convection’ can be attained in a Rayleigh–Bénard cell when the kinetic and thermal boundary layers are eliminated by replacing both lateral and horizontal walls with periodic boundary conditions (homogeneous Rayleigh–Bénard convection). Then, the heat transfer scales like and turbulence intensity as , where the Rayleigh number indicates the strength of the driving force (for fixed values of , which is the ratio between kinematic viscosity and thermal diffusivity). However, experiments never operate in unbounded domains and it is important to understand how confinement might alter the approach to this ultimate regime. Here we consider homogeneous Rayleigh–Bénard convection in a laterally confined geometry – a small-aspect-ratio vertical cylindrical cell – and show evidence of the ultimate regime as is increased: in spite of the lateral confinement and the resulting kinetic boundary layers, we still find at . Further, it is shown that the system supports solutions composed of modes of exponentially growing vertical velocity and temperature fields, with as the critical parameter determining the properties of these modes. Counter-intuitively, in the low- regime, or for very narrow cylinders, the numerical simulations are susceptible to these solutions, which can dominate the dynamics and lead to very high and unsteady heat transfer. As is increased, interaction between modes stabilizes the system, evidenced by the increasing homogeneity and reduced fluctuations in the root-mean-square velocity and temperature fields. We also test that physical results become independent of the periodicity length of the cylinder, a purely numerical parameter, as the aspect ratio is increased.