A device for dispensing a dental material comprising a nozzle head, a hand piece and a locking mechanism for locking the nozzle head and the hand piece, wherein the locking mechanism comprises: a snap connection and a screw connection; the locking mechanism being operable between: (i) a locked position in which the snap connection is engaged for retaining the nozzle head and the hand piece with each other and in which the screw connection is disengaged; (ii) a secured position in which the snap connection is disengaged and in which the screw connection is engaged for retaining the nozzle head and the hand piece with each other; (iii) a released position in which the snap connection and the screw connection are disengaged; wherein the snap connection comprises a retaining device for axially retaining the nozzle head at the hand piece, and the screw connection comprises a stopper element for preventing a separation of the nozzle head from the hand piece; wherein the retaining device comprises a ring shaped protrusion arranged at the hand piece and a ring shaped depression arranged at the nozzle head, wherein the ring shaped protrusion is adapted to engage the ring shaped depression in the locked position; wherein the stopper element comprises a first thread arranged at the nozzle head and at least one pin or at least one second thread arranged at the hand piece, wherein the first thread and the pin or the second thread are engaged for retaining the nozzle head and the hand piece with each other in the secured position. a snap connection and a screw connection; the locking mechanism being operable between: (i) a locked position in which the snap connection is engaged for retaining the nozzle head and the hand piece with each other and in which the screw connection is disengaged; (ii) a secured position in which the snap connection is disengaged and in which the screw connection is engaged for retaining the nozzle head and the hand piece with each other; (iii) a released position in which the snap connection and the screw connection are disengaged; (i) a locked position in which the snap connection is engaged for retaining the nozzle head and the hand piece with each other and in which the screw connection is disengaged; (ii) a secured position in which the snap connection is disengaged and in which the screw connection is engaged for retaining the nozzle head and the hand piece with each other; (iii) a released position in which the snap connection and the screw connection are disengaged; wherein the snap connection comprises a retaining device for axially retaining the nozzle head at the hand piece, and the screw connection comprises a stopper element for preventing a separation of the nozzle head from the hand piece; wherein the retaining device comprises a ring shaped protrusion arranged at the hand piece and a ring shaped depression arranged at the nozzle head, wherein the ring shaped protrusion is adapted to engage the ring shaped depression in the locked position; wherein the stopper element comprises a first thread arranged at the nozzle head and at least one pin or at least one second thread arranged at the hand piece, wherein the first thread and the pin or the second thread are engaged for retaining the nozzle head and the hand piece with each other in the secured position.