Rail for a vehicle seat, comprising first and second rail members mounted so as to slide in relation to one another along a longitudinal direction (X), said rail comprising a motorized drive mechanism able to cause relative movement between the first and second rail members 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 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 in relation to one another, said latch normally being held in the unlocked position, - and a latch control device 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 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 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 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 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 in relation to one another, said latch normally being held in the unlocked position, - and a latch control device 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 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 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 is mounted on the second rail member and can be actuated by movement of the pinion into the disengagement position. <EOS>