Cagβ is an ATPase in the H. pylori CagType4 secretion system essential for delivering the CagA effector to host cells. Here, authors present crystal structures of hexameric apo-Cagβ and Cagβ trapped in the monomeric state by its regulator CagZ, uncovering the regulatory mechanisms of Cagβ.