Rail for a vehicle seat, comprising first and second rail members (6, 16) mounted so as to slide in relation to one another along a longitudinal direction, said rail comprising a motorized drive mechanism (18, 14) able to cause relative movement between the first and second rail members (6, 16) along the longitudinal direction, said rail further comprising: - at least one mechanical latch that is movable between an unlocked position where said latch allows the first and second rail members (6, 16) to move freely in relation to one another along the longitudinal direction, and a locked position where said latch immobilizes the first and second rail members (6, 16) in relation to one another, said latch normally being held in the unlocked position, - and a latch control device (28, 33, 37a, 45, 46) able to detect accident conditions and, if accident conditions are detected, to control the latch so as to move it to the locked position. characterized in that - the motorized drive mechanism (18, 14) comprises a rack integral with the first rail member and a motor device mounted on the second rail member and comprising a pinion engaged with the rack, at least the pinion being mounted so as to be movable in relation to the rack between an engagement position where said pinion is engaged with the rack and a disengagement position where said pinion is at least partially disengaged from the rack, the pinion being resiliently biased towards the engagement position and able to move from the engagement position to the disengagement position when one of the first and second rail members (6, 16) is subjected to a force greater than a predetermined threshold along the longitudinal direction, - the latch is movably mounted on the second rail member, - and the latch control device (28, 33, 37a, 45, 46) is mounted on the second rail member and can be actuated by movement of the pinion into the disengagement position. - at least one mechanical latch that is movable between an unlocked position where said latch allows the first and second rail members (6, 16) to move freely in relation to one another along the longitudinal direction, and a locked position where said latch immobilizes the first and second rail members (6, 16) in relation to one another, said latch normally being held in the unlocked position, - and a latch control device (28, 33, 37a, 45, 46) able to detect accident conditions and, if accident conditions are detected, to control the latch so as to move it to the locked position. - the motorized drive mechanism (18, 14) comprises a rack integral with the first rail member and a motor device mounted on the second rail member and comprising a pinion engaged with the rack, at least the pinion being mounted so as to be movable in relation to the rack between an engagement position where said pinion is engaged with the rack and a disengagement position where said pinion is at least partially disengaged from the rack, the pinion being resiliently biased towards the engagement position and able to move from the engagement position to the disengagement position when one of the first and second rail members (6, 16) is subjected to a force greater than a predetermined threshold along the longitudinal direction, - the latch is movably mounted on the second rail member, - and the latch control device (28, 33, 37a, 45, 46) is mounted on the second rail member and can be actuated by movement of the pinion into the disengagement position.