A dental handpiece has a head section, a neck section, a grip section connected to the grip section, and a drive unit connected to the grip section. The handpiece also has detent means for preventing relative rotation between the neck and grip sections. The detent means includes a detent pin arranged axially slidably in the grip section, spring means for biasing the pin proximally so that the distal end of the pin is arranged inside the grip section in a rest position, and catch means formed at the proximal end of the neck section for receiving the pin for engagement. When the drive unit is brought into connection to the grip section, the pin is pressed distally to project out of the grip section into engagement in the catch means, to thereby prevent relative rotation between the neck section and the grip section.