Abstract: Highlights•Innovative design of a learnable 3D spinal shape prior module: This module, successfully integrated as a plug-and-play component within the network, learns spinal priors during training, refining the predicted spinal region boundaries and overcoming challenges related to inter-class similarity and intra-class variability, thereby significantly enhancing vertebrae segmentation performance.•Superior segmentation performance and robust generalization: The proposed method outperforms several state-of-the-art approaches across two independent datasets of different modalities, demonstrating strong generalizability and robustness, and providing valuable insights for the development of more efficient and effective SSM-based spinal segmentation methods.•The first Mamba-based 3D spinal segmentation model: By hybridizing SSM and CNN architectures, this model captures both local fine-grained features and long-range dependencies within images while maintaining linear computational complexity.