A device for treatment of the spine comprising one or more vertebral attachments, in which the vertebral attachments contain one or more magnets that provide physiologic attractive or repulsive forces to affect the interaction between adjacent vertebrae. The vertebral attachments may also comprise one or more connecting components that affix the magnets to the vertebrae. In addition, there are methods for treatment of the spine comprising implantation of the device.